Fix process.nextTick so thrown errors don't confuse it.
authorBenjamin Thomas <benjamin@benjaminthomas.org>
Fri, 27 Aug 2010 08:50:12 +0000 (02:50 -0600)
committerRyan Dahl <ry@tinyclouds.org>
Sat, 28 Aug 2010 05:13:50 +0000 (22:13 -0700)
commit57642e23497d5698aa4c5b8a44edff7b265c2283
tree49604fabc620ac4e5f55ed52b3bc1c5905daabc0
parent4fdebab005a4c52310f310110a33a5884ee1b86c
Fix process.nextTick so thrown errors don't confuse it.

If the function for a process.nextTick throws an error, then the
splice() never removes that function from the nextTickQueue array.  This
makes sure the functions that have been run in _tickCallback get removed
regardless of errors.

Also add a test for this.
src/node.js
test/simple/test-next-tick-errors.js [new file with mode: 0644]