-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
lib: fix guard expression in timer.unref() #165
Merged
Merged
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
@bnoordhuis can we craft a test that would simulate the same behaviour on all systems so we can catch regressions more reliably in the future? |
bnoordhuis
force-pushed
the
fix-arm-buildbot-failure
branch
from
December 17, 2014 13:54
8069684
to
48989f1
Compare
@rvagg Added a test. |
lgtm |
Fixes the following assertion on slow systems, like our ARM buildbot: $ out/Debug/node test/simple/test-timers-unref.js node: ../src/async-wrap-inl.h:101: v8::Handle<v8::Value> node::AsyncWrap::MakeCallback(uint32_t, int, v8::Handle<v8::Value>*): Assertion `cb_v->IsFunction()' failed. Aborted The reason it only manifests on slow systems is that the test starts a 1 ms interval timer, then defers timer.unref.bind({}) to the next tick. On fast systems, the test completes in under a millisecond, before the callback is called. This commit makes timer.unref() check that the receiver actually has a timeout callback property. Fixes nodejs#13. PR-URL: nodejs#165 Reviewed-By: Rod Vagg <rod@vagg.org>
bnoordhuis
force-pushed
the
fix-arm-buildbot-failure
branch
from
December 18, 2014 17:55
48989f1
to
ebf9f29
Compare
enricogior
pushed a commit
to thaliproject/jxcore
that referenced
this pull request
Mar 3, 2017
Fixes the following assertion on slow systems, like our ARM buildbot: $ out/Debug/node test/simple/test-timers-unref.js node: ../src/async-wrap-inl.h:101: v8::Handle<v8::Value> node::AsyncWrap::MakeCallback(uint32_t, int, v8::Handle<v8::Value>*): Assertion `cb_v->IsFunction()' failed. Aborted The reason it only manifests on slow systems is that the test starts a 1 ms interval timer, then defers timer.unref.bind({}) to the next tick. On fast systems, the test completes in under a millisecond, before the callback is called. This commit makes timer.unref() check that the receiver actually has a timeout callback property. Fixes #13. PR-URL: nodejs/node#165 Reviewed-By: Rod Vagg <rod@vagg.org>
enricogior
pushed a commit
to thaliproject/jxcore
that referenced
this pull request
Mar 4, 2017
Fixes the following assertion on slow systems, like our ARM buildbot: $ out/Debug/node test/simple/test-timers-unref.js node: ../src/async-wrap-inl.h:101: v8::Handle<v8::Value> node::AsyncWrap::MakeCallback(uint32_t, int, v8::Handle<v8::Value>*): Assertion `cb_v->IsFunction()' failed. Aborted The reason it only manifests on slow systems is that the test starts a 1 ms interval timer, then defers timer.unref.bind({}) to the next tick. On fast systems, the test completes in under a millisecond, before the callback is called. This commit makes timer.unref() check that the receiver actually has a timeout callback property. Fixes #13. PR-URL: nodejs/node#165 Reviewed-By: Rod Vagg <rod@vagg.org>
This was referenced Jan 31, 2020
This was referenced Sep 16, 2021
This was referenced Oct 14, 2022
This was referenced Nov 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes the following assertion on slow systems, like our ARM buildbot:
The reason it only manifests on slow systems is that the test starts
a 1 ms interval timer, then defers timer.unref.bind({}) to the next
tick. On fast systems, the test completes in under a millisecond,
before the callback is called.
This commit makes timer.unref() check that the receiver actually has
a timeout callback property.
Fixes #13.
R=@rvagg