Merge branch 'beta'

This commit is contained in:
Nathan Sobo
2015-11-17 16:57:33 -08:00
4 changed files with 20 additions and 6 deletions

View File

@@ -243,6 +243,21 @@ describe "AtomEnvironment", ->
atomEnvironment.destroy()
describe "::destroy()", ->
it "does not throw exceptions when unsubscribing from ipc events (regression)", ->
configDirPath = temp.mkdirSync()
fakeDocument = {
addEventListener: ->
removeEventListener: ->
head: document.createElement('head')
body: document.createElement('body')
}
atomEnvironment = new AtomEnvironment({applicationDelegate: atom.applicationDelegate, window, document: fakeDocument})
spyOn(atomEnvironment.packages, 'getAvailablePackagePaths').andReturn []
atomEnvironment.startEditorWindow()
atomEnvironment.unloadEditorWindow()
atomEnvironment.destroy()
describe "::openLocations(locations) (called via IPC from browser process)", ->
beforeEach ->
spyOn(atom.workspace, 'open')

View File

@@ -138,7 +138,7 @@ class ApplicationDelegate
ipc.on('message', outerCallback)
new Disposable ->
ipc.removeEventListener('message', outerCallback)
ipc.removeListener('message', outerCallback)
onUpdateAvailable: (callback) ->
outerCallback = (message, detail) ->
@@ -147,17 +147,17 @@ class ApplicationDelegate
ipc.on('message', outerCallback)
new Disposable ->
ipc.removeEventListener('message', outerCallback)
ipc.removeListener('message', outerCallback)
onApplicationMenuCommand: (callback) ->
ipc.on('command', callback)
new Disposable ->
ipc.removeEventListener('command', callback)
ipc.removeListener('command', callback)
onContextMenuCommand: (callback) ->
ipc.on('context-command', callback)
new Disposable ->
ipc.removeEventListener('context-command', callback)
ipc.removeListener('context-command', callback)
didCancelWindowUnload: ->
ipc.send('did-cancel-window-unload')

View File

@@ -623,7 +623,7 @@ class AtomEnvironment extends Model
@registerDefaultTargetForKeymaps()
@packages.loadPackages()
@loadStateSync()
@document.body.appendChild(@views.getView(@workspace))
@watchProjectPath()

View File

@@ -24,7 +24,6 @@ module.exports = ({blobStore}) ->
})
atom.displayWindow()
atom.loadStateSync()
atom.startEditorWindow()
# Workaround for focus getting cleared upon window creation