This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
timers: fix handling of large timeouts #3607
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
Don't use the double-negate trick to coalesce the timeout argument into a number, it produces the wrong result for very large timeouts. Example: setTimeout(cb, 1e10); // doesn't work, ~~1e10 == 1410065408
This was referenced Jul 1, 2012
LGTM. |
Landed in 0c47219. |
richardlau
pushed a commit
to ibmruntimes/node
that referenced
this pull request
Dec 15, 2015
Fix node exiting due to an exception being thrown rather than emitting an `'uncaughtException'` event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an `'uncaughtException'` event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and `--abort-on-uncaught-exception` is used. Finally, change the behavior of --abort-on-uncaught-exception so that, if the domain within which the error is thrown has no error handler, but a domain further up the domains stack has one, the process will not abort. Fixes nodejs#3607 and nodejs#3653. PR: nodejs#3654 PR-URL: nodejs/node#3654 Reviewed-By: Chris Dickinson <chris@neversaw.us>
richardlau
pushed a commit
to ibmruntimes/node
that referenced
this pull request
Dec 17, 2015
Fix node exiting due to an exception being thrown rather than emitting an 'uncaughtException' event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an 'uncaughtException' event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and --abort-on-uncaught-exception is used. Fixes nodejs#3607 and nodejs#3653. PR: nodejs#3887 PR-URL: nodejs/node#3887 Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau
pushed a commit
to ibmruntimes/node
that referenced
this pull request
Dec 17, 2015
Fix node exiting due to an exception being thrown rather than emitting an 'uncaughtException' event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an 'uncaughtException' event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and --abort-on-uncaught-exception is used. Fixes nodejs#3607 and nodejs#3653. PR: nodejs#3885 PR-URL: nodejs/node#3885 Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau
pushed a commit
to ibmruntimes/node
that referenced
this pull request
Dec 17, 2015
Fix node exiting due to an exception being thrown rather than emitting an `'uncaughtException'` event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an `'uncaughtException'` event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and `--abort-on-uncaught-exception` is used. Fixes nodejs#3607 and nodejs#3653. PR: nodejs#3884 PR-URL: nodejs/node#3884 Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau
pushed a commit
to ibmruntimes/node
that referenced
this pull request
Dec 18, 2015
Fix node exiting due to an exception being thrown rather than emitting an `'uncaughtException'` event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an `'uncaughtException'` event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and `--abort-on-uncaught-exception` is used. Fixes nodejs#3607 and nodejs#3653. PR: nodejs#3884 PR-URL: nodejs/node#3884 Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau
pushed a commit
to ibmruntimes/node
that referenced
this pull request
Jan 11, 2016
Fix node exiting due to an exception being thrown rather than emitting an `'uncaughtException'` event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an `'uncaughtException'` event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and `--abort-on-uncaught-exception` is used. Fixes nodejs#3607 and nodejs#3653. PR: nodejs#3884 PR-URL: nodejs/node#3884 Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau
pushed a commit
to ibmruntimes/node
that referenced
this pull request
Jan 13, 2016
Fix node exiting due to an exception being thrown rather than emitting an `'uncaughtException'` event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an `'uncaughtException'` event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and `--abort-on-uncaught-exception` is used. Finally, change the behavior of --abort-on-uncaught-exception so that, if the domain within which the error is thrown has no error handler, but a domain further up the domains stack has one, the process will not abort. Fixes nodejs#3607 and nodejs#3653. PR: nodejs#3654 PR-URL: nodejs/node#3654 Reviewed-By: Chris Dickinson <chris@neversaw.us>
richardlau
pushed a commit
to ibmruntimes/node
that referenced
this pull request
Feb 15, 2016
Fix node exiting due to an exception being thrown rather than emitting an 'uncaughtException' event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an 'uncaughtException' event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and --abort-on-uncaught-exception is used. Fixes nodejs#3607 and nodejs#3653. PR: nodejs#3885 PR-URL: nodejs/node#3885 Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau
pushed a commit
to ibmruntimes/node
that referenced
this pull request
Feb 15, 2016
Fix node exiting due to an exception being thrown rather than emitting an 'uncaughtException' event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an 'uncaughtException' event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and --abort-on-uncaught-exception is used. Fixes nodejs#3607 and nodejs#3653. PR: nodejs#3887 PR-URL: nodejs/node#3887 Reviewed-By: James M Snell <jasnell@gmail.com>
jBarz
pushed a commit
to ibmruntimes/node
that referenced
this pull request
Nov 4, 2016
Fix node exiting due to an exception being thrown rather than emitting an 'uncaughtException' event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an 'uncaughtException' event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and --abort-on-uncaught-exception is used. Fixes nodejs#3607 and nodejs#3653. PR: nodejs#3885 PR-URL: nodejs/node#3885 Reviewed-By: James M Snell <jasnell@gmail.com>
jBarz
pushed a commit
to ibmruntimes/node
that referenced
this pull request
Feb 16, 2017
Fix node exiting due to an exception being thrown rather than emitting an 'uncaughtException' event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an 'uncaughtException' event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and --abort-on-uncaught-exception is used. Fixes nodejs#3607 and nodejs#3653. PR: nodejs#3885 PR-URL: nodejs/node#3885 Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Don't use the double-negate trick to coalesce the timeout argument into a
number, it produces the wrong result for very large timeouts.
Example: