diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-04-25 01:03:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 01:03:45 +0200 |
commit | 1378df33647e2608733d88121b77ff2f839cddfa (patch) | |
tree | e2ecdf2028761e88eeb777d93bdd807384a36863 /cli/js/compiler.ts | |
parent | 912a57f6a20c632c306f4e044df7618a3971abbf (diff) |
remove bootstrap methods from global scope after bootstrapping (#4869)
Diffstat (limited to 'cli/js/compiler.ts')
-rw-r--r-- | cli/js/compiler.ts | 19 |
1 files changed, 8 insertions, 11 deletions
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, }, }); |