Skip to content
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 1 commit into from
Dec 18, 2014

Commits on Dec 18, 2014

  1. lib: fix guard expression in timer.unref()

    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 committed Dec 18, 2014
    Configuration menu
    Copy the full SHA
    ebf9f29 View commit details
    Browse the repository at this point in the history