Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju committed Sep 13, 2024
1 parent c715bfd commit 8b45e26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions core/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ use crate::futures::task::Context;
use crate::futures::task::Poll;
use crate::serde_json::json;
use crate::serde_json::Value;
use crate::AsyncRefCell;
use crate::CancelFuture;
use crate::CancelHandle;
use crate::RcRef;
use anyhow::Error;
use parking_lot::Mutex;
use std::cell::BorrowMutError;
Expand Down Expand Up @@ -781,7 +777,8 @@ impl Stream for InspectorSession {
pub struct LocalInspectorSessionRaw {
v8_session_tx: UnboundedSender<String>,
v8_session_rx: tokio::sync::Mutex<UnboundedReceiver<InspectorMsg>>,
cancel_handle: Rc<CancelHandle>,
// TODO:
// cancel_handle: Rc<CancelHandle>,
}

impl GarbageCollected for LocalInspectorSessionRaw {}
Expand All @@ -794,7 +791,8 @@ impl LocalInspectorSessionRaw {
Self {
v8_session_tx,
v8_session_rx: tokio::sync::Mutex::new(v8_session_rx),
cancel_handle: CancelHandle::new_rc(),
// TODO:
// cancel_handle: CancelHandle::new_rc(),
}
}

Expand Down Expand Up @@ -828,13 +826,13 @@ impl LocalInspectorSessionRaw {
pub fn disconnect(&self) {
// TODO(bartlomieju): this should at least have a cancel handle and cancel pending
// `self.receive_from_v8_session()` calls
eprintln!("LocalInspectorSessionRaw::disconnect not implemented");
// eprintln!("LocalInspectorSessionRaw::disconnect not implemented");
}
}

impl Drop for LocalInspectorSessionRaw {
fn drop(&mut self) {
eprintln!("Dropping LocalInspectorSessionRaw");
// eprintln!("Dropping LocalInspectorSessionRaw");
}
}
/// A local inspector session that can be used to send and receive protocol messages directly on
Expand Down
2 changes: 1 addition & 1 deletion core/ops_builtin_v8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ pub fn op_create_inspector_session(

state.has_inspector.set(true);
**inspector = Some(JsRuntimeInspector::new(
state.op_state.borrow().borrow::<*mut v8::Isolate>().clone(),
*state.op_state.borrow().borrow::<*mut v8::Isolate>(),
scope,
context,
false,
Expand Down

0 comments on commit 8b45e26

Please sign in to comment.