summaryrefslogtreecommitdiff
path: root/runtime/web_worker.rs
diff options
context:
space:
mode:
authorsnek <snek@deno.com>2024-11-06 15:08:26 +0100
committerGitHub <noreply@github.com>2024-11-06 14:08:26 +0000
commit700f54a13cce0fcdcf19d1893e3254579c7347f4 (patch)
tree16e72baca781c32c1304f3bed009878854ae9edc /runtime/web_worker.rs
parent64e887083aa67047f5ad37b9d55c418274b03ea3 (diff)
fix(ext/node): better inspector support (#26471)
implement local inspector future changes: - wire up InspectorServer to enable open/close/url - wire up connectToMainThread Fixes https://github.com/denoland/deno/issues/25004
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r--runtime/web_worker.rs14
1 files changed, 7 insertions, 7 deletions
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) = {