Merge pull request #1528 from pygy/ospec-next-tickish-fix

[ospec] fix nextTickish()
This commit is contained in:
Leo Horie 2017-01-10 10:35:29 -05:00 committed by GitHub
commit 301785b1a5

View file

@ -219,7 +219,7 @@ module.exports = new function init() {
if(hasProcess) {
nextTickish = process.nextTick
} else {
nextTickish = function fakeFastNextTick(fn) {
nextTickish = function fakeFastNextTick(next) {
if (stack++ < 5000) next()
else setTimeout(next, stack = 0)
}