From 429da4ee2d3cfd5dd0cf24d5f7953cc21bc878b4 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Sun, 28 May 2023 13:13:53 -0600 Subject: refactor(core): Refactor and re-organize code for easier maintenance (#19287) Part of some work to refactor and decouple the various parts of core. --- core/inspector.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'core/inspector.rs') 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, + scope: &mut v8::HandleScope, + context: v8::Local, is_main: bool, ) -> Rc> { - let scope = &mut v8::HandleScope::new(isolate); - let (new_session_tx, new_session_rx) = mpsc::unbounded::(); @@ -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 -- cgit v1.2.3