diff options
author | Trevor Norris <trev.norris@gmail.com> | 2014-12-15 19:57:28 -0800 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2014-12-19 16:31:12 -0800 |
commit | ae6444dad925a18a66ee0b1db3936534dbf822f4 (patch) | |
tree | 8b2fbd96eb6899ebf1f52a0c8c1e3e7a801a2a56 /lib/timers.js | |
parent | 4bba87050c2b8aa801d982e93ea767b3abdc2f17 (diff) | |
parent | 813114dab05231b71f3cdc4f5889b9833d9a1d06 (diff) | |
download | node-merge-review2.tar.gz |
Merge branch 'v0.10' into merge-review2merge-review2
Reverted caeb6773 for being unable to port the change to deps/v8. The
change will be ported directly in a later commit.
Conflicts:
ChangeLog
configure
doc/api/child_process.markdown
doc/api/tls.markdown
doc/api/url.markdown
lib/assert.js
lib/child_process.js
lib/crypto.js
lib/dgram.js
lib/http.js
lib/net.js
lib/timers.js
lib/tls.js
src/node.cc
src/node.h
src/node.js
src/node_crypto.cc
src/node_version.h
test/common.js
test/simple/test-child-process-spawn-typeerror.js
tools/certdata.txt
Diffstat (limited to 'lib/timers.js')
-rw-r--r-- | lib/timers.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/timers.js b/lib/timers.js index 68e3e65e9..041fe031c 100644 --- a/lib/timers.js +++ b/lib/timers.js @@ -284,6 +284,14 @@ var Timeout = function(after) { this._repeat = false; }; + +function unrefdHandle() { + this.owner._onTimeout(); + if (!this.owner._repeat) + this.owner.close(); +} + + Timeout.prototype.unref = function() { if (!this._handle) { var now = Timer.now(); @@ -292,6 +300,7 @@ Timeout.prototype.unref = function() { if (delay < 0) delay = 0; exports.unenroll(this); this._handle = new Timer(); + this._handle.owner = this; this._handle[kOnTimeout] = this._onTimeout; this._handle.start(delay, 0); this._handle.domain = this.domain; |