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.
This commit is contained in:
Chengzhong Wu 2023-01-07 05:37:42 +08:00 committed by GitHub
parent d1cdf65b10
commit 82e930726e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -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