summaryrefslogtreecommitdiff
path: root/runtime/js/99_main.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r--runtime/js/99_main.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 0c8989701..483ca9012 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -413,14 +413,16 @@ function promiseRejectMacrotaskCallback() {
}
let hasBootstrapped = false;
+// Delete the `console` object that V8 automaticaly adds onto the global wrapper
+// object on context creation. We don't want this console object to shadow the
+// `console` object exposed by the ext/node globalThis proxy.
+delete globalThis.console;
// Set up global properties shared by main and worker runtime.
ObjectDefineProperties(globalThis, windowOrWorkerGlobalScope);
// FIXME(bartlomieju): temporarily add whole `Deno.core` to
// `Deno[Deno.internal]` namespace. It should be removed and only necessary
// methods should be left there.
-ObjectAssign(internals, {
- core,
-});
+ObjectAssign(internals, { core });
const internalSymbol = Symbol("Deno.internal");
const finalDenoNs = {
internal: internalSymbol,