Merge branch 'master' into as-ns-startup-snapshot

This commit is contained in:
Antonio Scandurra
2017-03-10 16:47:27 +01:00
4 changed files with 26 additions and 1 deletions

View File

@@ -133,6 +133,7 @@ class AtomEnvironment extends Model
constructor: (params={}) ->
{@applicationDelegate, @window, @document, @blobStore, @clipboard, @configDirPath, @enablePersistence, onlyLoadBaseStyleSheets} = params
@nextProxyRequestId = 0
@unloaded = false
@loadTime = null
{devMode, safeMode, resourcePath, clearWindowState} = @getLoadSettings()
@@ -992,6 +993,16 @@ class AtomEnvironment extends Model
return
resolveProxy: (url) ->
return new Promise (resolve, reject) =>
requestId = @nextProxyRequestId++
disposable = @applicationDelegate.onDidResolveProxy (id, proxy) ->
if id is requestId
disposable.dispose()
resolve(proxy)
@applicationDelegate.resolveProxy(requestId, url)
# Preserve this deprecation until 2.0. Sorry. Should have removed Q sooner.
Promise.prototype.done = (callback) ->
deprecate("Atom now uses ES6 Promises instead of Q. Call promise.then instead of promise.done")