mirror of
https://github.com/atom/atom.git
synced 2026-02-11 07:05:11 -05:00
Merge branch 'master' into as-ns-startup-snapshot
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user