summaryrefslogtreecommitdiff
path: root/runtime/web_worker.rs
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2023-05-28 19:44:41 +0100
committerGitHub <noreply@github.com>2023-05-28 12:44:41 -0600
commitb6a3f8f722db89bc136e91da598f581c5838d38e (patch)
tree668542949383621fab493343cc2ddf8a4928c649 /runtime/web_worker.rs
parentbb0676d3e23dfd7fe27f9932b955694d51438486 (diff)
refactor(core): remove ext: modules from the module map (#19040)
Rather than disallowing `ext:` resolution, clear the module map after initializing extensions so extension modules are anonymized. This operation is explicitly called in `deno_runtime`. Re-inject `node:` specifiers into the module map after doing this. Fixes #17717.
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r--runtime/web_worker.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index 01262abcf..36f9718b5 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -4,6 +4,7 @@ use crate::inspector_server::InspectorServer;
use crate::ops;
use crate::permissions::PermissionsContainer;
use crate::tokio_util::create_and_run_current_thread;
+use crate::worker::init_runtime_module_map;
use crate::worker::FormatJsErrorFn;
use crate::BootstrapOptions;
use deno_broadcast_channel::InMemoryBroadcastChannel;
@@ -495,6 +496,7 @@ impl WebWorker {
inspector: options.maybe_inspector_server.is_some(),
..Default::default()
});
+ init_runtime_module_map(&mut js_runtime);
if let Some(server) = options.maybe_inspector_server.clone() {
server.register_inspector(