diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-05-28 13:13:53 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-28 19:13:53 +0000 |
commit | 429da4ee2d3cfd5dd0cf24d5f7953cc21bc878b4 (patch) | |
tree | c7713062058296153b0102977994c3788b798f92 /core/inspector.rs | |
parent | b6a3f8f722db89bc136e91da598f581c5838d38e (diff) |
refactor(core): Refactor and re-organize code for easier maintenance (#19287)
Part of some work to refactor and decouple the various parts of core.
Diffstat (limited to 'core/inspector.rs')
-rw-r--r-- | core/inspector.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/inspector.rs b/core/inspector.rs index 22d150154..d7c84608f 100644 --- a/core/inspector.rs +++ b/core/inspector.rs @@ -147,12 +147,10 @@ impl JsRuntimeInspector { const CONTEXT_GROUP_ID: i32 = 1; pub fn new( - isolate: &mut v8::OwnedIsolate, - context: v8::Global<v8::Context>, + scope: &mut v8::HandleScope, + context: v8::Local<v8::Context>, is_main: bool, ) -> Rc<RefCell<Self>> { - let scope = &mut v8::HandleScope::new(isolate); - let (new_session_tx, new_session_rx) = mpsc::unbounded::<InspectorSessionProxy>(); @@ -182,7 +180,6 @@ impl JsRuntimeInspector { )); // Tell the inspector about the global context. - let context = v8::Local::new(scope, context); let context_name = v8::inspector::StringView::from(&b"global context"[..]); // NOTE(bartlomieju): this is what Node.js does and it turns out some // debuggers (like VSCode) rely on this information to disconnect after |