summaryrefslogtreecommitdiff
path: root/runtime/web_worker.rs
diff options
context:
space:
mode:
authorSʜɪᴍᴜʀᴀ Yū <mail@yuhr.org>2024-08-29 11:18:41 +0900
committerGitHub <noreply@github.com>2024-08-29 07:48:41 +0530
commit4f97261a012edda267ff6b74c5b0b6d08a1c12b8 (patch)
tree4079e465473316102c580389f703c5753ff42048 /runtime/web_worker.rs
parent01eb017ed4bfca696e6923c90f7924db7b40a342 (diff)
fix(runtime/web_worker): populate `SnapshotOptions` for `WebWorker` when instantiated without snapshot (#25280)
Fixes #25277
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r--runtime/web_worker.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index 8178b93a8..ad0ac5a3f 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -506,7 +506,13 @@ impl WebWorker {
ops::signal::deno_signal::init_ops_and_esm(),
ops::tty::deno_tty::init_ops_and_esm(),
ops::http::deno_http_runtime::init_ops_and_esm(),
- ops::bootstrap::deno_bootstrap::init_ops_and_esm(None),
+ ops::bootstrap::deno_bootstrap::init_ops_and_esm(
+ if options.startup_snapshot.is_some() {
+ None
+ } else {
+ Some(Default::default())
+ },
+ ),
deno_permissions_web_worker::init_ops_and_esm(
permissions,
enable_testing_features,