summaryrefslogtreecommitdiff
path: root/runtime/web_worker.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r--runtime/web_worker.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index a2f2ffc5d..eb0aaf916 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -6,6 +6,7 @@ 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;
@@ -40,7 +41,6 @@ use std::cell::RefCell;
use std::fmt;
use std::rc::Rc;
use std::sync::atomic::AtomicBool;
-use std::sync::atomic::AtomicI32;
use std::sync::atomic::Ordering;
use std::sync::Arc;
use std::task::Context;
@@ -335,7 +335,7 @@ pub struct WebWorkerOptions {
pub broadcast_channel: InMemoryBroadcastChannel,
pub shared_array_buffer_store: Option<SharedArrayBufferStore>,
pub compiled_wasm_module_store: Option<CompiledWasmModuleStore>,
- pub maybe_exit_code: Option<Arc<AtomicI32>>,
+ pub exit_code: ExitCode,
pub stdio: Stdio,
}
@@ -421,11 +421,7 @@ impl WebWorker {
unstable,
options.unsafely_ignore_certificate_errors.clone(),
),
- ops::os::init(Some(
- options
- .maybe_exit_code
- .expect("Worker has access to OS ops but exit code was not passed."),
- )),
+ ops::os::init(options.exit_code),
ops::permissions::init(),
ops::process::init(),
ops::spawn::init(),