diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/examples/hello_runtime.rs | 1 | ||||
-rw-r--r-- | runtime/web_worker.rs | 3 | ||||
-rw-r--r-- | runtime/worker.rs | 4 |
3 files changed, 8 insertions, 0 deletions
diff --git a/runtime/examples/hello_runtime.rs b/runtime/examples/hello_runtime.rs index 047b8991b..707809037 100644 --- a/runtime/examples/hello_runtime.rs +++ b/runtime/examples/hello_runtime.rs @@ -43,6 +43,7 @@ async fn main() -> Result<(), AnyError> { origin_storage_dir: None, blob_store: BlobStore::default(), broadcast_channel: InMemoryBroadcastChannel::default(), + shared_array_buffer_store: None, }; let js_path = diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 55e107002..f8aadf4c2 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -28,6 +28,7 @@ use deno_core::ModuleId; use deno_core::ModuleLoader; use deno_core::ModuleSpecifier; use deno_core::RuntimeOptions; +use deno_core::SharedArrayBufferStore; use deno_web::create_entangled_message_port; use deno_web::BlobStore; use deno_web::MessagePort; @@ -269,6 +270,7 @@ pub struct WebWorkerOptions { pub get_error_class_fn: Option<GetErrorClassFn>, pub blob_store: BlobStore, pub broadcast_channel: InMemoryBroadcastChannel, + pub shared_array_buffer_store: Option<SharedArrayBufferStore>, } impl WebWorker { @@ -351,6 +353,7 @@ impl WebWorker { startup_snapshot: Some(js::deno_isolate_init()), js_error_create_fn: options.js_error_create_fn.clone(), get_error_class_fn: options.get_error_class_fn, + shared_array_buffer_store: options.shared_array_buffer_store.clone(), extensions, ..Default::default() }); diff --git a/runtime/worker.rs b/runtime/worker.rs index 555fc89d2..04c294146 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -22,6 +22,7 @@ use deno_core::ModuleId; use deno_core::ModuleLoader; use deno_core::ModuleSpecifier; use deno_core::RuntimeOptions; +use deno_core::SharedArrayBufferStore; use deno_web::BlobStore; use log::debug; use std::env; @@ -70,6 +71,7 @@ pub struct WorkerOptions { pub origin_storage_dir: Option<std::path::PathBuf>, pub blob_store: BlobStore, pub broadcast_channel: InMemoryBroadcastChannel, + pub shared_array_buffer_store: Option<SharedArrayBufferStore>, } impl MainWorker { @@ -136,6 +138,7 @@ impl MainWorker { startup_snapshot: Some(js::deno_isolate_init()), js_error_create_fn: options.js_error_create_fn.clone(), get_error_class_fn: options.get_error_class_fn, + shared_array_buffer_store: options.shared_array_buffer_store.clone(), extensions, ..Default::default() }); @@ -300,6 +303,7 @@ mod tests { origin_storage_dir: None, blob_store: BlobStore::default(), broadcast_channel: InMemoryBroadcastChannel::default(), + shared_array_buffer_store: None, }; MainWorker::from_options(main_module, permissions, &options) |