-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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: call destroy on interval error #20001
timers: call destroy on interval error #20001
Conversation
When an interval callback throws an error, the destroy hook is never called due to a faulty if condition.
/cc @mcollina @Fishrock123 @nodejs/timers |
} | ||
|
||
process.on('uncaughtException', common.mustCall((err) => { | ||
assert(err.message, 'setInterval Error'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to miss .strictEqual
.
const hooks = initHooks(); | ||
hooks.enable(); | ||
|
||
// install first timeout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: please always use capital letters for the first character of a comment and use punctuation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was left over from another test for async hooks. It's not a very helpful comment to be honest. Removing.
Updated. Another CI: https://ci.nodejs.org/job/node-test-pull-request/14248/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When an interval callback throws an error, the destroy hook is never called due to a faulty if condition. PR-URL: #20001 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
When an interval callback throws an error, the destroy hook is never called due to a faulty if condition. PR-URL: #20001 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
When an interval callback throws an error, the destroy hook is never called due to a faulty if condition.
This change can be backported unlike the semver-major one in the next PR which would bring us in line with the browsers (and the spec).
CI: https://ci.nodejs.org/job/node-test-pull-request/14244/
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes