Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dc38dd2

Browse filesBrowse files
RaisinTendanielleadams
authored andcommitted
timers: fix unsafe array iteration
Fixes: #37222 PR-URL: #37223 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 3fee5b2 commit dc38dd2
Copy full SHA for dc38dd2

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Collapse file

‎lib/internal/timers.js‎

Copy file name to clipboardExpand all lines: lib/internal/timers.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ const {
7979
NumberMIN_SAFE_INTEGER,
8080
ObjectCreate,
8181
Symbol,
82+
ReflectApply,
8283
} = primordials;
8384

8485
const {
@@ -555,7 +556,7 @@ function getTimerCallbacks(runNextTicks) {
555556
if (args === undefined)
556557
timer._onTimeout();
557558
else
558-
timer._onTimeout(...args);
559+
ReflectApply(timer._onTimeout, timer, args);
559560
} finally {
560561
if (timer._repeat && timer._idleTimeout !== -1) {
561562
timer._idleTimeout = timer._repeat;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.