diff options
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r-- | runtime/web_worker.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index ba2c016cc..19e344ee7 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -335,6 +335,7 @@ pub struct WebWorkerOptions { pub shared_array_buffer_store: Option<SharedArrayBufferStore>, pub compiled_wasm_module_store: Option<CompiledWasmModuleStore>, pub stdio: Stdio, + pub startup_snapshot: Option<deno_core::Snapshot>, } impl WebWorker { @@ -427,6 +428,8 @@ impl WebWorker { ops::tty::init(), deno_http::init(), ops::http::init(), + // Runtime JS + js::init(), // Permissions ext (worker specific state) perm_ext, ]; @@ -436,7 +439,7 @@ impl WebWorker { let mut js_runtime = JsRuntime::new(RuntimeOptions { module_loader: Some(options.module_loader.clone()), - startup_snapshot: Some(js::deno_isolate_init()), + startup_snapshot: options.startup_snapshot.take(), source_map_getter: options.source_map_getter, get_error_class_fn: options.get_error_class_fn, shared_array_buffer_store: options.shared_array_buffer_store.clone(), |