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/ops/worker_host.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/ops/worker_host.rs')
-rw-r--r-- | runtime/ops/worker_host.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/runtime/ops/worker_host.rs b/runtime/ops/worker_host.rs index 9860f7cb5..b61fca460 100644 --- a/runtime/ops/worker_host.rs +++ b/runtime/ops/worker_host.rs @@ -11,7 +11,6 @@ use crate::web_worker::WebWorkerHandle; use crate::web_worker::WebWorkerType; use crate::web_worker::WorkerControlEvent; use crate::web_worker::WorkerId; -use crate::worker::ExitCode; use crate::worker::FormatJsErrorFn; use deno_core::error::AnyError; use deno_core::futures::future::LocalFutureObj; @@ -37,7 +36,6 @@ pub struct CreateWebWorkerArgs { pub permissions: Permissions, pub main_module: ModuleSpecifier, pub worker_type: WebWorkerType, - pub exit_code: ExitCode, } pub type CreateWebWorkerCb = dyn Fn(CreateWebWorkerArgs) -> (WebWorker, SendableWebWorkerHandle) @@ -171,7 +169,6 @@ fn op_create_worker( parent_permissions.clone() }; let parent_permissions = parent_permissions.clone(); - let exit_code = state.borrow::<ExitCode>().clone(); let worker_id = state.take::<WorkerId>(); let create_web_worker_cb = state.take::<CreateWebWorkerCbHolder>(); state.put::<CreateWebWorkerCbHolder>(create_web_worker_cb.clone()); @@ -207,7 +204,6 @@ fn op_create_worker( permissions: worker_permissions, main_module: module_specifier.clone(), worker_type, - exit_code, }); // Send thread safe handle from newly created worker to host thread |