node/lib
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
..
_debug_agent.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_debugger.js debugger: use requireRepl() to load debugger repl 2014-12-06 15:24:54 -05:00
_http_agent.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_http_client.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_http_common.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_http_incoming.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_http_outgoing.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_http_server.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_linklist.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_stream_duplex.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_stream_passthrough.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_stream_readable.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_stream_transform.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_stream_writable.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_tls_common.js crypto: throw if the key doesn't match cert 2014-11-25 18:51:23 +03:00
_tls_legacy.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
_tls_wrap.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
assert.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
buffer.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
child_process.js lib,src: fix spawnSync ignoring its 'env' option 2014-12-09 18:41:30 +01:00
cluster.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
console.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
constants.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
crypto.js crypto: allow creation of GCM ciphers with createCipher 2014-11-25 18:53:35 +03:00
dgram.js src: all wraps now use actual FunctionTemplate 2014-12-09 17:57:15 +01:00
dns.js src: all wraps now use actual FunctionTemplate 2014-12-09 17:57:15 +01:00
domain.js domain: add soft deprecation notice 2014-12-12 09:52:05 -08:00
events.js events: implement EventEmitter#getMaxListeners() 2014-12-05 22:10:35 +01:00
freelist.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
fs.js fs: add access() and accessSync() 2014-12-15 12:05:49 -05:00
http.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
https.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
module.js module: fix regression in require ../ 2014-12-11 10:18:00 +01:00
net.js src: all wraps now use actual FunctionTemplate 2014-12-09 17:57:15 +01:00
os.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
path.js path: refactor normalizeArray() 2014-12-09 17:57:09 +01:00
punycode.js punycode: update to v1.3.2 2014-11-28 13:21:43 +03:00
querystring.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
readline.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
repl.js lib: reintroduce v8 module 2014-12-14 18:52:57 +01:00
smalloc.js smalloc: don't allow to dispose typed arrays 2014-12-09 17:57:09 +01:00
stream.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
string_decoder.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
sys.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
timers.js lib: fix guard expression in timer.unref() 2014-12-18 18:24:29 +01:00
tls.js Merge remote-tracking branch 'joyent/v0.12' into v0.12 2014-11-22 17:55:59 +01:00
tty.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
url.js url: change hostname regex to negate invalid chars 2014-12-09 17:57:10 +01:00
util.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
v8.js lib: reintroduce v8 module 2014-12-14 18:52:57 +01:00
vm.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00
zlib.js lib: turn on strict mode 2014-11-22 17:23:30 +01:00