diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2022-05-17 21:27:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-17 22:27:17 +0200 |
commit | 330c820ae8d7826dfe3d88c01ba07728121fa021 (patch) | |
tree | a5c0216f5cba4ea503e9cba3b0abdd8d4290c123 /runtime/js/11_workers.js | |
parent | f57aac77ff9ce514730504066daca0a61a959d32 (diff) |
BREAKING(unstable): Enable Deno namespace in workers by default (#14581)
This commit removes "WorkerOptions.deno" option as a boolean,
as well as "WorkerOptions.deno.namespace" settings. Starting
with this commit all workers have access to "Deno" namespace
by default.
Diffstat (limited to 'runtime/js/11_workers.js')
-rw-r--r-- | runtime/js/11_workers.js | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/runtime/js/11_workers.js b/runtime/js/11_workers.js index 87949c1c0..948542d1c 100644 --- a/runtime/js/11_workers.js +++ b/runtime/js/11_workers.js @@ -27,7 +27,6 @@ specifier, hasSourceCode, sourceCode, - useDenoNamespace, permissions, name, workerType, @@ -38,7 +37,6 @@ permissions: serializePermissions(permissions), sourceCode, specifier, - useDenoNamespace, workerType, }); } @@ -79,20 +77,6 @@ type = "classic", } = options; - let namespace; - let permissions; - if (typeof deno == "object") { - namespace = deno.namespace ?? false; - permissions = deno.permissions ?? undefined; - } else { - // Assume `deno: boolean | undefined`. - // TODO(Soremwar) - // `deno: boolean` is kept for backwards compatibility with the previous - // worker options implementation. Remove for 2.0 - namespace = !!deno; - permissions = undefined; - } - const workerType = webidl.converters["WorkerType"](type); if ( @@ -120,8 +104,7 @@ specifier, hasSourceCode, sourceCode, - namespace, - permissions, + deno?.permissions, name, workerType, ); |