diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-09-14 23:49:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-14 23:49:12 -0400 |
commit | 055dfe2ff437099aef105fe4beab0f0c8cc53506 (patch) | |
tree | 5a3ea8f59d665b8e5d6ec87c3f8f6f26039b1021 /cli/inspector.rs | |
parent | 85b98f6dd8aaf63acef58fea904dd81f6e5cbaf6 (diff) |
Make JsRuntimeState private (#7484)
Diffstat (limited to 'cli/inspector.rs')
-rw-r--r-- | cli/inspector.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/cli/inspector.rs b/cli/inspector.rs index dbab615e5..691c147fe 100644 --- a/cli/inspector.rs +++ b/cli/inspector.rs @@ -394,9 +394,7 @@ impl DenoInspector { isolate: &mut deno_core::JsRuntime, host: SocketAddr, ) -> Box<Self> { - let core_state_rc = deno_core::JsRuntime::state(isolate); - let core_state = core_state_rc.borrow(); - + let context = isolate.global_context(); let scope = &mut v8::HandleScope::new(&mut **isolate); let (new_websocket_tx, new_websocket_rx) = @@ -434,11 +432,7 @@ impl DenoInspector { }); // Tell the inspector about the global context. - let context = core_state - .global_context - .as_ref() - .map(|context| v8::Local::new(scope, context)) - .unwrap(); + let context = v8::Local::new(scope, context); let context_name = v8::inspector::StringView::from(&b"global context"[..]); self_.context_created(context, Self::CONTEXT_GROUP_ID, context_name); |