From 1378df33647e2608733d88121b77ff2f839cddfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 25 Apr 2020 01:03:45 +0200 Subject: remove bootstrap methods from global scope after bootstrapping (#4869) --- cli/js/compiler.ts | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'cli/js/compiler.ts') diff --git a/cli/js/compiler.ts b/cli/js/compiler.ts index 91653a8e4..da9b62472 100644 --- a/cli/js/compiler.ts +++ b/cli/js/compiler.ts @@ -407,16 +407,13 @@ function bootstrapWasmCompilerRuntime(): void { delete (Object.prototype as any).__proto__; Object.defineProperties(globalThis, { - bootstrapWasmCompilerRuntime: { - value: bootstrapWasmCompilerRuntime, - enumerable: false, - writable: false, - configurable: false, - }, - bootstrapTsCompilerRuntime: { - value: bootstrapTsCompilerRuntime, - enumerable: false, - writable: false, - configurable: false, + bootstrap: { + value: { + ...globalThis.bootstrap, + wasmCompilerRuntime: bootstrapWasmCompilerRuntime, + tsCompilerRuntime: bootstrapTsCompilerRuntime, + }, + configurable: true, + writable: true, }, }); -- cgit v1.2.3