From: Cheng Zhao Date: Tue, 22 Sep 2015 06:29:21 +0000 (+0800) Subject: Don't make setImmediate a local variable X-Git-Tag: v0.33.1~1^2~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=eccb5e759074277bfa2670abafe5731f40bd38b5;p=electron.git Don't make setImmediate a local variable It makes more troubles than benefits, and somehow it is slowing message loop down. --- diff --git a/atom/common/lib/init.coffee b/atom/common/lib/init.coffee index 4bc3e369..5db6b7dc 100644 --- a/atom/common/lib/init.coffee +++ b/atom/common/lib/init.coffee @@ -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 diff --git a/vendor/node b/vendor/node index aa9c7a23..fa54694a 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit aa9c7a2316ba7762f1d04d091585695be3e6be22 +Subproject commit fa54694af4350bf1720ff47e97a07c7c09325ee2