diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/snapshot.rs | 7 | ||||
-rw-r--r-- | runtime/web_worker.rs | 14 | ||||
-rw-r--r-- | runtime/worker.rs | 15 |
3 files changed, 22 insertions, 14 deletions
diff --git a/runtime/snapshot.rs b/runtime/snapshot.rs index 0d81af6e7..251ee5f41 100644 --- a/runtime/snapshot.rs +++ b/runtime/snapshot.rs @@ -82,6 +82,13 @@ impl deno_node::NodePermissions for Permissions { ) -> Result<(), PermissionCheckError> { unreachable!("snapshotting!") } + fn check_net( + &mut self, + _host: (&str, Option<u16>), + _api_name: &str, + ) -> Result<(), PermissionCheckError> { + unreachable!("snapshotting!") + } fn check_read_path<'a>( &mut self, _path: &'a Path, diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 04cd3305e..61e5c7702 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -562,7 +562,7 @@ impl WebWorker { extension_transpiler: Some(Rc::new(|specifier, source| { maybe_transpile_source(specifier, source) })), - inspector: services.maybe_inspector_server.is_some(), + inspector: true, feature_checker: Some(services.feature_checker), op_metrics_factory_fn, import_meta_resolve_callback: Some(Box::new( @@ -579,18 +579,18 @@ impl WebWorker { js_runtime.op_state().borrow_mut().put(op_summary_metrics); } + // Put inspector handle into the op state so we can put a breakpoint when + // executing a CJS entrypoint. + let op_state = js_runtime.op_state(); + let inspector = js_runtime.inspector(); + op_state.borrow_mut().put(inspector); + if let Some(server) = services.maybe_inspector_server { server.register_inspector( options.main_module.to_string(), &mut js_runtime, false, ); - - // Put inspector handle into the op state so we can put a breakpoint when - // executing a CJS entrypoint. - let op_state = js_runtime.op_state(); - let inspector = js_runtime.inspector(); - op_state.borrow_mut().put(inspector); } let (internal_handle, external_handle) = { diff --git a/runtime/worker.rs b/runtime/worker.rs index b780aefc1..88a61fa93 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -488,7 +488,7 @@ impl MainWorker { extension_transpiler: Some(Rc::new(|specifier, source| { maybe_transpile_source(specifier, source) })), - inspector: options.maybe_inspector_server.is_some(), + inspector: true, is_main: true, feature_checker: Some(services.feature_checker.clone()), op_metrics_factory_fn, @@ -546,6 +546,12 @@ impl MainWorker { js_runtime.op_state().borrow_mut().put(op_summary_metrics); } + // Put inspector handle into the op state so we can put a breakpoint when + // executing a CJS entrypoint. + let op_state = js_runtime.op_state(); + let inspector = js_runtime.inspector(); + op_state.borrow_mut().put(inspector); + if let Some(server) = options.maybe_inspector_server.clone() { server.register_inspector( main_module.to_string(), @@ -553,13 +559,8 @@ impl MainWorker { options.should_break_on_first_statement || options.should_wait_for_inspector_session, ); - - // Put inspector handle into the op state so we can put a breakpoint when - // executing a CJS entrypoint. - let op_state = js_runtime.op_state(); - let inspector = js_runtime.inspector(); - op_state.borrow_mut().put(inspector); } + let ( bootstrap_fn_global, dispatch_load_event_fn_global, |