Don't make setImmediate a local variable
It makes more troubles than benefits, and somehow it is slowing message loop down.
This commit is contained in:
parent
008af00044
commit
eccb5e7590
2 changed files with 3 additions and 8 deletions
|
@ -37,6 +37,8 @@ wrapWithActivateUvLoop = (func) ->
|
|||
process.activateUvLoop()
|
||||
func.apply this, arguments
|
||||
process.nextTick = wrapWithActivateUvLoop process.nextTick
|
||||
global.setImmediate = wrapWithActivateUvLoop timers.setImmediate
|
||||
global.clearImmediate = timers.clearImmediate
|
||||
|
||||
if process.type is 'browser'
|
||||
# setTimeout needs to update the polling timeout of the event loop, when
|
||||
|
@ -45,10 +47,3 @@ if process.type is 'browser'
|
|||
# recalculate the timeout in browser process.
|
||||
global.setTimeout = wrapWithActivateUvLoop timers.setTimeout
|
||||
global.setInterval = wrapWithActivateUvLoop timers.setInterval
|
||||
global.setImmediate = wrapWithActivateUvLoop timers.setImmediate
|
||||
global.clearImmediate = wrapWithActivateUvLoop timers.clearImmediate
|
||||
else
|
||||
# There are no setImmediate under renderer process by default, so we need to
|
||||
# manually setup them here.
|
||||
global.setImmediate = setImmediate
|
||||
global.clearImmediate = clearImmediate
|
||||
|
|
2
vendor/node
vendored
2
vendor/node
vendored
|
@ -1 +1 @@
|
|||
Subproject commit aa9c7a2316ba7762f1d04d091585695be3e6be22
|
||||
Subproject commit fa54694af4350bf1720ff47e97a07c7c09325ee2
|
Loading…
Reference in a new issue