diff options
Diffstat (limited to 'cli/rt')
-rw-r--r-- | cli/rt/06_util.js | 1 | ||||
-rw-r--r-- | cli/rt/99_main.js | 14 |
2 files changed, 6 insertions, 9 deletions
diff --git a/cli/rt/06_util.js b/cli/rt/06_util.js index b0ed5696f..011fa6de5 100644 --- a/cli/rt/06_util.js +++ b/cli/rt/06_util.js @@ -53,7 +53,6 @@ function immutableDefine( o, p, - // eslint-disable-next-line @typescript-eslint/no-explicit-any value, ) { Object.defineProperty(o, p, { diff --git a/cli/rt/99_main.js b/cli/rt/99_main.js index 846216ec4..c6d6d1395 100644 --- a/cli/rt/99_main.js +++ b/cli/rt/99_main.js @@ -1,7 +1,6 @@ // Removes the `__proto__` for security reasons. This intentionally makes // Deno non compliant with ECMA-262 Annex B.2.2.1 // -// eslint-disable-next-line @typescript-eslint/no-explicit-any delete Object.prototype.__proto__; ((window) => { @@ -292,9 +291,9 @@ delete Object.prototype.__proto__; if (hasBootstrapped) { throw new Error("Worker runtime already bootstrapped"); } - // Remove bootstrapping methods from global scope - globalThis.__bootstrap = undefined; - globalThis.bootstrap = undefined; + // Remove bootstrapping data from the global scope + delete globalThis.__bootstrap; + delete globalThis.bootstrap; util.log("bootstrapMainRuntime"); hasBootstrapped = true; Object.defineProperties(globalThis, windowOrWorkerGlobalScopeMethods); @@ -360,9 +359,9 @@ delete Object.prototype.__proto__; if (hasBootstrapped) { throw new Error("Worker runtime already bootstrapped"); } - // Remove bootstrapping methods from global scope - globalThis.__bootstrap = undefined; - globalThis.bootstrap = undefined; + // Remove bootstrapping data from the global scope + delete globalThis.__bootstrap; + delete globalThis.bootstrap; util.log("bootstrapWorkerRuntime"); hasBootstrapped = true; Object.defineProperties(globalThis, windowOrWorkerGlobalScopeMethods); @@ -412,7 +411,6 @@ delete Object.prototype.__proto__; workerRuntime: bootstrapWorkerRuntime, }, configurable: true, - writable: true, }, }); })(this); |