diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-02-07 13:54:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-07 13:54:32 +0100 |
commit | bf22f114a6e049744866ebaba48faec2cb86549b (patch) | |
tree | ea6814e51bade2355144546f21178f54811a57f2 /ext/timers | |
parent | 9c7ed1c98b75c3557ac9e269212dcf655f69c0a2 (diff) |
refactor: update runtime code for primordial check for iterators (#13510)
Diffstat (limited to 'ext/timers')
-rw-r--r-- | ext/timers/01_timers.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/timers/01_timers.js b/ext/timers/01_timers.js index caa490e61..a0b1deb45 100644 --- a/ext/timers/01_timers.js +++ b/ext/timers/01_timers.js @@ -17,6 +17,7 @@ NumberPOSITIVE_INFINITY, PromisePrototypeThen, ObjectPrototypeIsPrototypeOf, + SafeArrayIterator, SymbolFor, TypeError, } = window.__bootstrap.primordials; @@ -159,7 +160,11 @@ // 3. // TODO(@andreubotella): Error handling. if (typeof callback === "function") { - FunctionPrototypeCall(callback, globalThis, ...args); + FunctionPrototypeCall( + callback, + globalThis, + ...new SafeArrayIterator(args), + ); } else { // TODO(@andreubotella): eval doesn't seem to have a primordial, but // it can be redefined in the global scope. |