From 82e930726ee5dbac8e6eae0962c07c72daf9843c Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Sat, 7 Jan 2023 05:37:42 +0800 Subject: fix(core): get v8 console from context extra bindings (#17243) Explicitly get `console` object from V8 instead of relying on `console` defined on the global object. --- runtime/js/99_main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/js') diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 873f371ca..d4a5a0a84 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -399,7 +399,7 @@ delete Intl.v8BreakIterator; performance.setTimeOrigin(DateNow()); net.setup(runtimeOptions.unstableFlag); - const consoleFromV8 = window.console; + const consoleFromV8 = window.Deno.core.console; const wrapConsole = window.__bootstrap.console.wrapConsole; // Remove bootstrapping data from the global scope @@ -544,7 +544,7 @@ delete Intl.v8BreakIterator; performance.setTimeOrigin(DateNow()); net.setup(runtimeOptions.unstableFlag); - const consoleFromV8 = window.console; + const consoleFromV8 = window.Deno.core.console; const wrapConsole = window.__bootstrap.console.wrapConsole; // Remove bootstrapping data from the global scope -- cgit v1.2.3