summaryrefslogtreecommitdiff
path: root/cli/js/runtime_main.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-04-25 01:03:45 +0200
committerGitHub <noreply@github.com>2020-04-25 01:03:45 +0200
commit1378df33647e2608733d88121b77ff2f839cddfa (patch)
treee2ecdf2028761e88eeb777d93bdd807384a36863 /cli/js/runtime_main.ts
parent912a57f6a20c632c306f4e044df7618a3971abbf (diff)
remove bootstrap methods from global scope after bootstrapping (#4869)
Diffstat (limited to 'cli/js/runtime_main.ts')
-rw-r--r--cli/js/runtime_main.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/js/runtime_main.ts b/cli/js/runtime_main.ts
index 0b0b1f75f..4c6df892c 100644
--- a/cli/js/runtime_main.ts
+++ b/cli/js/runtime_main.ts
@@ -72,6 +72,9 @@ export function bootstrapMainRuntime(): void {
if (hasBootstrapped) {
throw new Error("Worker runtime already bootstrapped");
}
+ // Remove bootstrapping methods from global scope
+ // @ts-ignore
+ globalThis.bootstrap = undefined;
log("bootstrapMainRuntime");
hasBootstrapped = true;
Object.defineProperties(globalThis, windowOrWorkerGlobalScopeMethods);