mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 02:22:40 +00:00
remove bootstrap methods from global scope after bootstrapping (#4869)
This commit is contained in:
parent
912a57f6a2
commit
1378df3364
12 changed files with 42 additions and 39 deletions
|
@ -9,16 +9,12 @@ import { bootstrapWorkerRuntime } from "./runtime_worker.ts";
|
|||
delete (Object.prototype as any).__proto__;
|
||||
|
||||
Object.defineProperties(globalThis, {
|
||||
bootstrapMainRuntime: {
|
||||
value: bootstrapMainRuntime,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
configurable: false,
|
||||
},
|
||||
bootstrapWorkerRuntime: {
|
||||
value: bootstrapWorkerRuntime,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
configurable: false,
|
||||
bootstrap: {
|
||||
value: {
|
||||
mainRuntime: bootstrapMainRuntime,
|
||||
workerRuntime: bootstrapWorkerRuntime,
|
||||
},
|
||||
configurable: true,
|
||||
writable: true,
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue