summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/examples/hello_runtime.rs1
-rw-r--r--runtime/worker.rs3
2 files changed, 4 insertions, 0 deletions
diff --git a/runtime/examples/hello_runtime.rs b/runtime/examples/hello_runtime.rs
index fca7ff2c9..a47e9c908 100644
--- a/runtime/examples/hello_runtime.rs
+++ b/runtime/examples/hello_runtime.rs
@@ -66,6 +66,7 @@ async fn main() -> Result<(), AnyError> {
shared_array_buffer_store: None,
compiled_wasm_module_store: None,
stdio: Default::default(),
+ leak_isolate: true,
};
let js_path =
diff --git a/runtime/worker.rs b/runtime/worker.rs
index e624cb2b4..42ff6b0f9 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -141,6 +141,7 @@ pub struct WorkerOptions {
/// `WebAssembly.Module` objects cannot be serialized.
pub compiled_wasm_module_store: Option<CompiledWasmModuleStore>,
pub stdio: Stdio,
+ pub leak_isolate: bool,
}
impl Default for WorkerOptions {
@@ -177,6 +178,7 @@ impl Default for WorkerOptions {
startup_snapshot: Default::default(),
bootstrap: Default::default(),
stdio: Default::default(),
+ leak_isolate: false,
}
}
}
@@ -304,6 +306,7 @@ impl MainWorker {
extensions_with_js: options.extensions_with_js,
inspector: options.maybe_inspector_server.is_some(),
is_main: true,
+ leak_isolate: options.leak_isolate,
..Default::default()
});