summaryrefslogtreecommitdiff
path: root/ext/fetch/26_fetch.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-02-07 13:54:32 +0100
committerGitHub <noreply@github.com>2022-02-07 13:54:32 +0100
commitbf22f114a6e049744866ebaba48faec2cb86549b (patch)
treeea6814e51bade2355144546f21178f54811a57f2 /ext/fetch/26_fetch.js
parent9c7ed1c98b75c3557ac9e269212dcf655f69c0a2 (diff)
refactor: update runtime code for primordial check for iterators (#13510)
Diffstat (limited to 'ext/fetch/26_fetch.js')
-rw-r--r--ext/fetch/26_fetch.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/fetch/26_fetch.js b/ext/fetch/26_fetch.js
index 0c58bbf97..bbcbb44f0 100644
--- a/ext/fetch/26_fetch.js
+++ b/ext/fetch/26_fetch.js
@@ -38,6 +38,7 @@
Promise,
PromisePrototypeThen,
PromisePrototypeCatch,
+ SafeArrayIterator,
String,
StringPrototypeStartsWith,
StringPrototypeToLowerCase,
@@ -168,7 +169,7 @@
if (this.urlList.length == 0) return null;
return this.urlList[this.urlList.length - 1];
},
- urlList: recursive ? [] : [...req.urlList],
+ urlList: recursive ? [] : [...new SafeArrayIterator(req.urlList)],
};
}
@@ -331,7 +332,7 @@
if (recursive) return response;
if (response.urlList.length === 0) {
- response.urlList = [...req.urlList];
+ response.urlList = [...new SafeArrayIterator(req.urlList)];
}
return response;