This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test case: var t = setInterval(function() {}, 1); process.nextTick(t.unref); Output: Assertion failed: (args.Holder()->InternalFieldCount() > 0), function Unref, file ../src/handle_wrap.cc, line 78. setInterval() returns a binding layer object. Make it stop doing that, wrap the raw process.binding('timer_wrap').Timer object in a Timeout object. Fixes #4261.
- Loading branch information
1 parent
1deeab2
commit 22533c0
Showing
2 changed files
with
32 additions
and
12 deletions.
There are no files selected for viewing
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
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
22533c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes a little backwards-compatibility issue for anything that needs to get a timer's callback.
0.10.6 (and earlier):
cb = timer.ontimeout;
vs
0.10.7 +:
cb = timer._onTimeout;
Thankfully we can do this:
cb = timer._onTimeout || timer.ontimeout;
22533c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Fishrock123 I mean you're pretty much relying on undocumented properties there... it's bound to break sooner or later.
22533c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but you have to do what you have to do sometimes. :s
22533c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
22533c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh? ^^
22533c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jesusabdullah hahah, idk what happened there...