Created
April 20, 2016 22:03
-
-
Save dnwe/129b20c14ee1e02a616e3ef131f8d1fe to your computer and use it in GitHub Desktop.
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
diff --git a/src/node.js b/src/node.js | |
index c194c23..afc8e23 100644 | |
--- a/src/node.js | |
+++ b/src/node.js | |
@@ -473,25 +473,26 @@ | |
function nextTick(callback) { | |
// on the way out, don't bother. it won't get fired anyway. | |
if (process._exiting) | |
return; | |
var args; | |
if (arguments.length > 1) { | |
args = []; | |
for (var i = 1; i < arguments.length; i++) | |
args.push(arguments[i]); | |
} | |
- nextTickQueue.push(new TickObject(callback, args)); | |
+ const tickObj = new TickObject(callback, args) | |
+ nextTickQueue.push(tickObj); | |
tickInfo[kLength]++; | |
} | |
function emitPendingUnhandledRejections() { | |
var hadListeners = false; | |
while (pendingUnhandledRejections.length > 0) { | |
var promise = pendingUnhandledRejections.shift(); | |
var reason = pendingUnhandledRejections.shift(); | |
if (hasBeenNotifiedProperty.get(promise) === false) { | |
hasBeenNotifiedProperty.set(promise, true); | |
if (!process.emit('unhandledRejection', reason, promise)) { | |
// Nobody is listening. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi, @dnwe
I apply this patch to node-v4.8.0(on Debian8), but it does not work...