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/runtime_main.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cli/js/runtime_main.ts') 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); -- cgit v1.2.3