summaryrefslogtreecommitdiff
path: root/runtime/js/99_main.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r--runtime/js/99_main.js29
1 files changed, 11 insertions, 18 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index cf2525b06..b469a29dc 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -26,7 +26,6 @@ delete Object.prototype.__proto__;
PromisePrototypeThen,
TypeError,
} = window.__bootstrap.primordials;
- const infra = window.__bootstrap.infra;
const util = window.__bootstrap.util;
const eventTarget = window.__bootstrap.eventTarget;
const globalInterfaces = window.__bootstrap.globalInterfaces;
@@ -627,7 +626,6 @@ delete Object.prototype.__proto__;
function bootstrapWorkerRuntime(
runtimeOptions,
name,
- useDenoNamespace,
internalName,
) {
if (hasBootstrapped) {
@@ -697,23 +695,18 @@ delete Object.prototype.__proto__;
close: core.close,
...denoNs,
};
- if (useDenoNamespace) {
- if (unstableFlag) {
- ObjectAssign(finalDenoNs, denoNsUnstable);
- }
- ObjectDefineProperties(finalDenoNs, {
- pid: util.readOnly(pid),
- noColor: util.readOnly(noColor),
- args: util.readOnly(ObjectFreeze(args)),
- });
- // Setup `Deno` global - we're actually overriding already
- // existing global `Deno` with `Deno` namespace from "./deno.ts".
- ObjectDefineProperty(globalThis, "Deno", util.readOnly(finalDenoNs));
- ObjectFreeze(globalThis.Deno.core);
- } else {
- delete globalThis.Deno;
- infra.assert(globalThis.Deno === undefined);
+ if (unstableFlag) {
+ ObjectAssign(finalDenoNs, denoNsUnstable);
}
+ ObjectDefineProperties(finalDenoNs, {
+ pid: util.readOnly(pid),
+ noColor: util.readOnly(noColor),
+ args: util.readOnly(ObjectFreeze(args)),
+ });
+ // Setup `Deno` global - we're actually overriding already
+ // existing global `Deno` with `Deno` namespace from "./deno.ts".
+ ObjectDefineProperty(globalThis, "Deno", util.readOnly(finalDenoNs));
+ ObjectFreeze(globalThis.Deno.core);
}
ObjectDefineProperties(globalThis, {