From 865d9ddd51dcc8776bf8c3976057e2f29a1a5af2 Mon Sep 17 00:00:00 2001 From: Yusuke Tanaka Date: Mon, 26 Jul 2021 20:52:59 +0900 Subject: refactor: use `primordials` in runtime, extensions and core (#11500) --- runtime/js/06_util.js | 10 ++++++++-- runtime/js/99_main.js | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'runtime/js') diff --git a/runtime/js/06_util.js b/runtime/js/06_util.js index 88c2edc74..b6a3c3438 100644 --- a/runtime/js/06_util.js +++ b/runtime/js/06_util.js @@ -2,8 +2,14 @@ "use strict"; ((window) => { - const { ObjectDefineProperty, StringPrototypeReplace, TypeError, Promise } = - window.__bootstrap.primordials; + const { + ObjectDefineProperty, + StringPrototypeReplace, + TypeError, + Promise, + decodeURIComponent, + Error, + } = window.__bootstrap.primordials; const { build } = window.__bootstrap.build; const { URL } = window.__bootstrap.url; let logDebug = false; diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 834e692f6..a48105559 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -552,7 +552,7 @@ delete Object.prototype.__proto__; ObjectDefineProperties(globalThis, windowOrWorkerGlobalScope); ObjectDefineProperties(globalThis, workerRuntimeGlobalProperties); ObjectDefineProperties(globalThis, { name: util.readOnly(name) }); - Object.setPrototypeOf(globalThis, DedicatedWorkerGlobalScope.prototype); + ObjectSetPrototypeOf(globalThis, DedicatedWorkerGlobalScope.prototype); const consoleFromDeno = globalThis.console; wrapConsole(consoleFromDeno, consoleFromV8); -- cgit v1.2.3