summaryrefslogtreecommitdiff
path: root/runtime/js/06_util.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-01-27 16:27:22 +0100
committerGitHub <noreply@github.com>2022-01-27 16:27:22 +0100
commitf248e6f1778dc26db91d3322de2ecca5d1aa9866 (patch)
tree46b1ff59091cc8d31ff67427173d3a0148734007 /runtime/js/06_util.js
parent382a978859a7a7a4351542be818bb2e59523429c (diff)
Revert "refactor: update runtime code for primordial checks for "instanceof" (#13497)" (#13511)
This reverts commit 884143218fad0e18f7553aaf079d52de703f7601.
Diffstat (limited to 'runtime/js/06_util.js')
-rw-r--r--runtime/js/06_util.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/runtime/js/06_util.js b/runtime/js/06_util.js
index e934c4f0e..9b255615e 100644
--- a/runtime/js/06_util.js
+++ b/runtime/js/06_util.js
@@ -3,15 +3,14 @@
((window) => {
const {
- decodeURIComponent,
- Error,
- ObjectPrototypeIsPrototypeOf,
- Promise,
StringPrototypeReplace,
TypeError,
+ Promise,
+ decodeURIComponent,
+ Error,
} = window.__bootstrap.primordials;
const { build } = window.__bootstrap.build;
- const { URLPrototype } = window.__bootstrap.url;
+ const { URL } = window.__bootstrap.url;
let logDebug = false;
let logSource = "JS";
@@ -94,7 +93,7 @@
}
function pathFromURL(pathOrUrl) {
- if (ObjectPrototypeIsPrototypeOf(URLPrototype, pathOrUrl)) {
+ if (pathOrUrl instanceof URL) {
if (pathOrUrl.protocol != "file:") {
throw new TypeError("Must be a file URL.");
}