node/test
Ben Noordhuis ebf9f297b3 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 #13.

PR-URL: https://github.com/iojs/io.js/pull/165
Reviewed-By: Rod Vagg <rod@vagg.org>
2014-12-18 18:24:29 +01:00
..
addons node,async-wrap: verify domain enter/exit are set 2014-09-02 11:30:45 -07:00
debugger debugger: assign Environment to DebugContext too 2014-05-02 22:12:54 +04:00
disabled deps: re-implement debugger-agent 2014-10-08 15:44:40 +04:00
fixtures test: split test in parallel/sequential 2014-12-17 20:45:02 +07:00
gc test: update our branched weakref to v8 3.24 2014-03-17 10:19:47 -07:00
internet src: all wraps now use actual FunctionTemplate 2014-12-09 17:57:15 +01:00
message test: make test runner multi-arch/mode compatible 2014-10-16 22:39:34 +02:00
parallel lib: fix guard expression in timer.unref() 2014-12-18 18:24:29 +01:00
pummel test: move simple/test-abort-fatal-error to pummel 2014-12-06 02:37:30 +01:00
sequential test: split test in parallel/sequential 2014-12-17 20:45:02 +07:00
testpy test: run tests in parallel, common improvements 2014-12-17 20:45:37 +07:00
timers test: make test runner multi-arch/mode compatible 2014-10-16 22:39:34 +02:00
common.js test: run tests in parallel, common improvements 2014-12-17 20:45:37 +07:00