-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: handle unrefed intervals in clearTimeout() #9606
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit clears the _repeat property of all timer objects in clearTimeout(). This prevents intervals passed to clearTimeout() from being rearmed.
nodejs-github-bot
added
the
timers
Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.
label
Nov 14, 2016
I don't think this is an exhaustive patch.
|
See #9561 (comment) |
3 tasks
Fishrock123
added a commit
to Fishrock123/node
that referenced
this pull request
Nov 22, 2016
Previously not all codepaths set `timer._idleTimeout = -1` for canceled or closed timers, and not all codepaths checked it either. Unenroll uses this to say that a timer is indeed closed and it is the closest thing there is to an authoritative source for this. Refs: nodejs#9606 Fixes: nodejs#9561 PR-URL: nodejs#9685 Reviewed-By: Rich Trott <[email protected]>
Fishrock123
added a commit
that referenced
this pull request
Nov 22, 2016
Previously not all codepaths set `timer._idleTimeout = -1` for canceled or closed timers, and not all codepaths checked it either. Unenroll uses this to say that a timer is indeed closed and it is the closest thing there is to an authoritative source for this. Refs: #9606 Fixes: #9561 PR-URL: #9685 Reviewed-By: Rich Trott <[email protected]>
Fishrock123
added a commit
to Fishrock123/node
that referenced
this pull request
Dec 21, 2016
Previously not all codepaths set `timer._idleTimeout = -1` for canceled or closed timers, and not all codepaths checked it either. Unenroll uses this to say that a timer is indeed closed and it is the closest thing there is to an authoritative source for this. Refs: nodejs#9606 Fixes: nodejs#9561 PR-URL: nodejs#9685 Reviewed-By: Rich Trott <[email protected]> Conflicts: lib/timers.js
MylesBorins
pushed a commit
that referenced
this pull request
Dec 21, 2016
Previously not all codepaths set `timer._idleTimeout = -1` for canceled or closed timers, and not all codepaths checked it either. Unenroll uses this to say that a timer is indeed closed and it is the closest thing there is to an authoritative source for this. Refs: #9606 Fixes: #9561 PR-URL: #9685 Reviewed-By: Rich Trott <[email protected]> Conflicts: lib/timers.js
MylesBorins
pushed a commit
that referenced
this pull request
Dec 21, 2016
Previously not all codepaths set `timer._idleTimeout = -1` for canceled or closed timers, and not all codepaths checked it either. Unenroll uses this to say that a timer is indeed closed and it is the closest thing there is to an authoritative source for this. Refs: #9606 Fixes: #9561 PR-URL: #9685 Reviewed-By: Rich Trott <[email protected]>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 21, 2016
Previously not all codepaths set `timer._idleTimeout = -1` for canceled or closed timers, and not all codepaths checked it either. Unenroll uses this to say that a timer is indeed closed and it is the closest thing there is to an authoritative source for this. Refs: #9606 Fixes: #9561 PR-URL: #9685 Reviewed-By: Rich Trott <[email protected]>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 21, 2016
Previously not all codepaths set `timer._idleTimeout = -1` for canceled or closed timers, and not all codepaths checked it either. Unenroll uses this to say that a timer is indeed closed and it is the closest thing there is to an authoritative source for this. Refs: #9606 Fixes: #9561 PR-URL: #9685 Reviewed-By: Rich Trott <[email protected]> Conflicts: lib/timers.js
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
timers
Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
timers
Description of change
This commit clears the
_repeat
property of all timer objects inclearTimeout()
. This prevents intervals passed toclearTimeout()
from being rearmed.Fixes: #9561 (although it does not directly address
wrap->object()
issue described in #9561 (comment))R= @bnoordhuis