mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use setTimeout instead of setImmediate in MenuManager
This should fix the flaky test failures that have been occurring on windows VSTS builds
This commit is contained in:
@@ -149,9 +149,9 @@ class MenuManager
|
||||
update: ->
|
||||
return unless @initialized
|
||||
|
||||
clearImmediate(@pendingUpdateOperation) if @pendingUpdateOperation?
|
||||
clearTimeout(@pendingUpdateOperation) if @pendingUpdateOperation?
|
||||
|
||||
@pendingUpdateOperation = setImmediate =>
|
||||
@pendingUpdateOperation = setTimeout(=>
|
||||
unsetKeystrokes = new Set
|
||||
for binding in @keymapManager.getKeyBindings()
|
||||
if binding.command is 'unset!'
|
||||
@@ -168,6 +168,7 @@ class MenuManager
|
||||
keystrokesByCommand[binding.command].unshift binding.keystrokes
|
||||
|
||||
@sendToBrowserProcess(@template, keystrokesByCommand)
|
||||
, 1)
|
||||
|
||||
loadPlatformItems: ->
|
||||
if platformMenu?
|
||||
|
||||
Reference in New Issue
Block a user