summaryrefslogtreecommitdiff
path: root/runtime/js/06_util.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/06_util.js')
-rw-r--r--runtime/js/06_util.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/js/06_util.js b/runtime/js/06_util.js
index 9b255615e..e934c4f0e 100644
--- a/runtime/js/06_util.js
+++ b/runtime/js/06_util.js
@@ -3,14 +3,15 @@
((window) => {
const {
- StringPrototypeReplace,
- TypeError,
- Promise,
decodeURIComponent,
Error,
+ ObjectPrototypeIsPrototypeOf,
+ Promise,
+ StringPrototypeReplace,
+ TypeError,
} = window.__bootstrap.primordials;
const { build } = window.__bootstrap.build;
- const { URL } = window.__bootstrap.url;
+ const { URLPrototype } = window.__bootstrap.url;
let logDebug = false;
let logSource = "JS";
@@ -93,7 +94,7 @@
}
function pathFromURL(pathOrUrl) {
- if (pathOrUrl instanceof URL) {
+ if (ObjectPrototypeIsPrototypeOf(URLPrototype, pathOrUrl)) {
if (pathOrUrl.protocol != "file:") {
throw new TypeError("Must be a file URL.");
}