From bf22f114a6e049744866ebaba48faec2cb86549b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 7 Feb 2022 13:54:32 +0100 Subject: refactor: update runtime code for primordial check for iterators (#13510) --- ext/fetch/23_request.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ext/fetch/23_request.js') diff --git a/ext/fetch/23_request.js b/ext/fetch/23_request.js index 5294009ff..1ffdd2a60 100644 --- a/ext/fetch/23_request.js +++ b/ext/fetch/23_request.js @@ -38,6 +38,7 @@ ObjectKeys, ObjectPrototypeIsPrototypeOf, RegExpPrototypeTest, + SafeArrayIterator, Symbol, SymbolFor, TypeError, @@ -101,7 +102,9 @@ */ function cloneInnerRequest(request) { const headerList = [ - ...ArrayPrototypeMap(request.headerList, (x) => [x[0], x[1]]), + ...new SafeArrayIterator( + ArrayPrototypeMap(request.headerList, (x) => [x[0], x[1]]), + ), ]; let body = null; if (request.body !== null) { -- cgit v1.2.3