FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

timers: handle unrefed intervals in clearTimeout() by cjihrig · Pull Request #9606 · nodejs/node · GitHub

/ node Public

timers: handle unrefed intervals in clearTimeout() - #9606

Closed
cjihrig wants to merge 1 commit into
nodejs:masterfrom
cjihrig:9561
Closed

timers: handle unrefed intervals in clearTimeout()#9606
cjihrig wants to merge 1 commit into
nodejs:masterfrom
cjihrig:9561

Conversation

cjihrig commented Nov 14, 2016

Copy link
Copy Markdown
Contributor
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

timers

Description of change

This commit clears the _repeat property of all timer objects in clearTimeout(). This prevents intervals passed to clearTimeout() from being rearmed.

Fixes: #9561 (although it does not directly address wrap->object() issue described in #9561 (comment))

R= @bnoordhuis

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

Copy link
Copy Markdown
Contributor

I don't think this is an exhaustive patch.

unenroll() should cancel any timer callbacks without fail and Timer#close() should always stop the _handle without fail.

Copy link
Copy Markdown
Contributor

See #9561 (comment)

cjihrig closed this Nov 18, 2016
cjihrig deleted the 9561 branch November 18, 2016 21:13
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 <rtrott@gmail.com>
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 <rtrott@gmail.com>
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 <rtrott@gmail.com>

 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 <rtrott@gmail.com>

 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 <rtrott@gmail.com>
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 <rtrott@gmail.com>
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 <rtrott@gmail.com>

 Conflicts:
	lib/timers.js
This file contains hidden or 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
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL