mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
timers: fix unsafe array iteration
Fixes: https://github.com/nodejs/node/issues/37222 PR-URL: https://github.com/nodejs/node/pull/37223 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
3fee5b2219
commit
dc38dd2c6f
1 file changed
+2
-1
@@ -79,6 +79,7 @@ const {
|
||||
NumberMIN_SAFE_INTEGER,
|
||||
ObjectCreate,
|
||||
Symbol,
|
||||
ReflectApply,
|
||||
} = primordials;
|
||||
|
||||
const {
|
||||
@@ -555,7 +556,7 @@ function getTimerCallbacks(runNextTicks) {
|
||||
if (args === undefined)
|
||||
timer._onTimeout();
|
||||
else
|
||||
timer._onTimeout(...args);
|
||||
ReflectApply(timer._onTimeout, timer, args);
|
||||
} finally {
|
||||
if (timer._repeat && timer._idleTimeout !== -1) {
|
||||
timer._idleTimeout = timer._repeat;
|
||||
|
||||
Reference in new issue
Block a user