mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 10:33:54 +00:00
refactor: update runtime code for primordial check for iterators (#13510)
This commit is contained in:
parent
9c7ed1c98b
commit
bf22f114a6
17 changed files with 141 additions and 65 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue