Merge pull request #1528 from pygy/ospec-next-tickish-fix
[ospec] fix nextTickish()
This commit is contained in:
commit
301785b1a5
1 changed files with 1 additions and 1 deletions
|
|
@ -219,7 +219,7 @@ module.exports = new function init() {
|
||||||
if(hasProcess) {
|
if(hasProcess) {
|
||||||
nextTickish = process.nextTick
|
nextTickish = process.nextTick
|
||||||
} else {
|
} else {
|
||||||
nextTickish = function fakeFastNextTick(fn) {
|
nextTickish = function fakeFastNextTick(next) {
|
||||||
if (stack++ < 5000) next()
|
if (stack++ < 5000) next()
|
||||||
else setTimeout(next, stack = 0)
|
else setTimeout(next, stack = 0)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue