summaryrefslogtreecommitdiff
path: root/src/node.js
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2011-11-01 16:30:41 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2011-11-01 16:30:43 +0100
commit362b5a6c401d08eafad701f4b6023e357a82f910 (patch)
treef9e70d78ef1ab8ca5a431e7f1bd1e4c3505f2ab7 /src/node.js
parentf5a01d17643a7c66876a84d53b33b8c3e6c75752 (diff)
downloadnodejs-362b5a6c401d08eafad701f4b6023e357a82f910.tar.gz
nodejs-362b5a6c401d08eafad701f4b6023e357a82f910.tar.bz2
nodejs-362b5a6c401d08eafad701f4b6023e357a82f910.zip
process: fix process.nextTick() error case regression
Patch and test by Koichi Kobayashi.
Diffstat (limited to 'src/node.js')
-rw-r--r--src/node.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node.js b/src/node.js
index a874bd55c..403c61830 100644
--- a/src/node.js
+++ b/src/node.js
@@ -192,6 +192,9 @@
for (var i = 0; i < l; i++) q[i]();
}
catch (e) {
+ if (i + 1 < l) {
+ nextTickQueue = q.slice(i + 1).concat(nextTickQueue);
+ }
if (nextTickQueue.length) {
process._needTickCallback();
}