From c49eee551fdf78ab0230ec30d4537c98dd5d0c80 Mon Sep 17 00:00:00 2001 From: Andreu Botella Date: Tue, 31 Aug 2021 19:33:03 +0200 Subject: feat(workers): Make the `Deno` namespace configurable and unfrozen (#11888) This is the worker counterpart of PR #11062. --- runtime/js/99_main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runtime/js/99_main.js') diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index fc3eeecca..c9dd611da 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -695,8 +695,7 @@ delete Object.prototype.__proto__; }); // Setup `Deno` global - we're actually overriding already // existing global `Deno` with `Deno` namespace from "./deno.ts". - util.immutableDefine(globalThis, "Deno", finalDenoNs); - ObjectFreeze(globalThis.Deno); + ObjectDefineProperty(globalThis, "Deno", util.readOnly(finalDenoNs)); ObjectFreeze(globalThis.Deno.core); signals.setSignals(); } else { -- cgit v1.2.3