summaryrefslogtreecommitdiff
path: root/ext/url
diff options
context:
space:
mode:
Diffstat (limited to 'ext/url')
-rw-r--r--ext/url/00_url.js4
-rw-r--r--ext/url/01_urlpattern.js7
2 files changed, 6 insertions, 5 deletions
diff --git a/ext/url/00_url.js b/ext/url/00_url.js
index ebb7b6277..75bf7372a 100644
--- a/ext/url/00_url.js
+++ b/ext/url/00_url.js
@@ -194,7 +194,7 @@
context: "Argument 1",
});
const values = [];
- for (const entry of this[_list]) {
+ for (const entry of new SafeArrayIterator(this[_list])) {
if (entry[0] === name) {
ArrayPrototypePush(values, entry[1]);
}
@@ -214,7 +214,7 @@
prefix,
context: "Argument 1",
});
- for (const entry of this[_list]) {
+ for (const entry of new SafeArrayIterator(this[_list])) {
if (entry[0] === name) {
return entry[1];
}
diff --git a/ext/url/01_urlpattern.js b/ext/url/01_urlpattern.js
index ac18a4c82..cef48eabb 100644
--- a/ext/url/01_urlpattern.js
+++ b/ext/url/01_urlpattern.js
@@ -20,6 +20,7 @@
RegExp,
RegExpPrototypeExec,
RegExpPrototypeTest,
+ SafeArrayIterator,
Symbol,
SymbolFor,
TypeError,
@@ -71,7 +72,7 @@
const components = ops.op_urlpattern_parse(input, baseURL);
- for (const key of ObjectKeys(components)) {
+ for (const key of new SafeArrayIterator(ObjectKeys(components))) {
try {
components[key].regexp = new RegExp(
components[key].regexpString,
@@ -155,7 +156,7 @@
const [values] = res;
- for (const key of ObjectKeys(values)) {
+ for (const key of new SafeArrayIterator(ObjectKeys(values))) {
if (!RegExpPrototypeTest(this[_components][key].regexp, values[key])) {
return false;
}
@@ -201,7 +202,7 @@
const result = { inputs };
/** @type {string} */
- for (const key of ObjectKeys(values)) {
+ for (const key of new SafeArrayIterator(ObjectKeys(values))) {
/** @type {Component} */
const component = this[_components][key];
const input = values[key];