diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2019-04-19 17:39:54 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-04-19 20:39:54 -0400 |
commit | c8db224efed08d7722c9951cde048d731db050d3 (patch) | |
tree | b492275744af8dfae9977ef8309925e725daba09 /js/os.ts | |
parent | 0796a8f2f75005df95ef6115a4bdf6dd66e58dc3 (diff) |
Make Deno/Deno.core not deletable/writable (#2153)
Diffstat (limited to 'js/os.ts')
-rw-r--r-- | js/os.ts | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -6,6 +6,7 @@ import * as flatbuffers from "./flatbuffers"; import { TextDecoder } from "./text_encoding"; import { assert } from "./util"; import * as util from "./util"; +import { window } from "./window"; /** The current process id of the runtime. */ export let pid: number; @@ -168,5 +169,9 @@ export function start(source?: string): msg.StartRes { setGlobals(startResMsg.pid(), startResMsg.noColor(), startResMsg.execPath()!); + // Deno.core could ONLY be safely frozen here (not in globals.ts) + // since shared_queue.js will modify core properties. + Object.freeze(window.Deno.core); + return startResMsg; } |