Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timers: attach listOnTimeout function to TimerWrap #18388

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ function TimersList(msecs, unrefed) {
if (unrefed === true)
timer.unref();
timer.start(msecs);

timer[kOnTimeout] = listOnTimeout;
}

function listOnTimeout() {
// adds listOnTimeout to the C++ object prototype, as
// V8 would not inline it otherwise.
TimerWrap.prototype[kOnTimeout] = function listOnTimeout() {
var list = this._list;
var msecs = list.msecs;

Expand Down Expand Up @@ -291,7 +291,7 @@ function listOnTimeout() {
return;

this.close();
}
};


// An optimization so that the try/finally only de-optimizes (since at least v8
Expand Down