mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 02:22:40 +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
|
@ -24,6 +24,7 @@
|
|||
RegExp,
|
||||
RegExpPrototypeTest,
|
||||
Set,
|
||||
SafeArrayIterator,
|
||||
StringPrototypeEndsWith,
|
||||
StringPrototypeIncludes,
|
||||
StringPrototypeSlice,
|
||||
|
@ -278,7 +279,10 @@ finishing test case.`;
|
|||
|
||||
const post = core.resources();
|
||||
|
||||
const allResources = new Set([...ObjectKeys(pre), ...ObjectKeys(post)]);
|
||||
const allResources = new Set([
|
||||
...new SafeArrayIterator(ObjectKeys(pre)),
|
||||
...new SafeArrayIterator(ObjectKeys(post)),
|
||||
]);
|
||||
|
||||
const details = [];
|
||||
for (const resource of allResources) {
|
||||
|
@ -322,7 +326,7 @@ finishing test case.`;
|
|||
});
|
||||
|
||||
try {
|
||||
await fn(...params);
|
||||
await fn(...new SafeArrayIterator(params));
|
||||
} catch (err) {
|
||||
throw err;
|
||||
} finally {
|
||||
|
@ -423,7 +427,7 @@ finishing test case.`;
|
|||
const token = pledgePermissions(permissions);
|
||||
|
||||
try {
|
||||
await fn(...params);
|
||||
await fn(...new SafeArrayIterator(params));
|
||||
} finally {
|
||||
restorePermissions(token);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue