From 4f97261a012edda267ff6b74c5b0b6d08a1c12b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CA=9C=C9=AA=E1=B4=8D=E1=B4=9C=CA=80=E1=B4=80=20Yu=CC=84?= Date: Thu, 29 Aug 2024 11:18:41 +0900 Subject: [PATCH] fix(runtime/web_worker): populate `SnapshotOptions` for `WebWorker` when instantiated without snapshot (#25280) Fixes #25277 --- runtime/web_worker.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 8178b93a8b..ad0ac5a3f2 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,