diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-06-13 23:53:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-13 23:53:04 +0200 |
commit | fc3a966a2d0be8fc76c384603bf18b55e0bbcf14 (patch) | |
tree | 2a3425488e0a199c035efbdde35c45cae1c22fb7 /runtime/web_worker.rs | |
parent | 4a0a412d7cd077ff519b4da8f6ffd1247c6375a5 (diff) |
Deno.exit() is an alias to self.close() in worker contexts (#14826)
This commit changes Deno.exit() to be an alias to self.close() in worker contexts,
and the provided exit code becomes is ignored.
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r-- | runtime/web_worker.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index eb0aaf916..ba2c016cc 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -6,7 +6,6 @@ use crate::ops; use crate::ops::io::Stdio; use crate::permissions::Permissions; use crate::tokio_util::run_basic; -use crate::worker::ExitCode; use crate::worker::FormatJsErrorFn; use crate::BootstrapOptions; use deno_broadcast_channel::InMemoryBroadcastChannel; @@ -335,7 +334,6 @@ pub struct WebWorkerOptions { pub broadcast_channel: InMemoryBroadcastChannel, pub shared_array_buffer_store: Option<SharedArrayBufferStore>, pub compiled_wasm_module_store: Option<CompiledWasmModuleStore>, - pub exit_code: ExitCode, pub stdio: Stdio, } @@ -421,7 +419,7 @@ impl WebWorker { unstable, options.unsafely_ignore_certificate_errors.clone(), ), - ops::os::init(options.exit_code), + ops::os::init_for_worker(), ops::permissions::init(), ops::process::init(), ops::spawn::init(), |