2020-01-02 15:13:47 -05:00
|
|
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
2020-07-06 21:45:39 -04:00
|
|
|
|
2020-01-27 21:12:25 -05:00
|
|
|
import { bootstrapMainRuntime } from "./runtime_main.ts";
|
2020-02-11 04:04:59 -05:00
|
|
|
import { bootstrapWorkerRuntime } from "./runtime_worker.ts";
|
2019-09-02 17:07:11 -04:00
|
|
|
|
2020-03-15 06:34:22 -04:00
|
|
|
// Removes the `__proto__` for security reasons. This intentionally makes
|
|
|
|
// Deno non compliant with ECMA-262 Annex B.2.2.1
|
|
|
|
//
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
delete (Object.prototype as any).__proto__;
|
|
|
|
|
2020-01-27 21:12:25 -05:00
|
|
|
Object.defineProperties(globalThis, {
|
2020-04-24 19:03:45 -04:00
|
|
|
bootstrap: {
|
|
|
|
value: {
|
|
|
|
mainRuntime: bootstrapMainRuntime,
|
|
|
|
workerRuntime: bootstrapWorkerRuntime,
|
|
|
|
},
|
|
|
|
configurable: true,
|
|
|
|
writable: true,
|
2020-03-28 13:03:49 -04:00
|
|
|
},
|
2020-01-27 21:12:25 -05:00
|
|
|
});
|