mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Don't emit window:loaded event until async window initialization completes
Signed-off-by: Katrina Uychaco <kuychaco@github.com>
This commit is contained in:
committed by
Katrina Uychaco
parent
656cac8814
commit
9b2c791c86
@@ -68,7 +68,9 @@ module.exports = ({blobStore}) ->
|
||||
logFile, headless, testPaths, buildAtomEnvironment, buildDefaultApplicationDelegate, legacyTestRunner
|
||||
})
|
||||
|
||||
promise.then(exitWithStatusCode) if getWindowLoadSettings().headless
|
||||
promise.then (statusCode) ->
|
||||
exitWithStatusCode(statusCode) if getWindowLoadSettings().headless
|
||||
|
||||
catch error
|
||||
if getWindowLoadSettings().headless
|
||||
console.error(error.stack ? error)
|
||||
|
||||
@@ -83,8 +83,9 @@
|
||||
setupCsonCache(CompileCache.getCacheDirectory())
|
||||
|
||||
var initialize = require(loadSettings.windowInitializationScript)
|
||||
initialize({blobStore: blobStore})
|
||||
require('ipc').sendChannel('window-command', 'window:loaded')
|
||||
initialize({blobStore: blobStore}).then(function () {
|
||||
require('ipc').sendChannel('window-command', 'window:loaded')
|
||||
})
|
||||
}
|
||||
|
||||
function setupCsonCache (cacheDir) {
|
||||
|
||||
Reference in New Issue
Block a user