зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1195496 - Move speculative connection from CLH to GeckoApp; r=snorp
Moving speculative connection from CLH to GeckoApp allows us to start the speculative connection very early in the startup process rather than later in startup.
This commit is contained in:
Родитель
192182c441
Коммит
a800417633
|
@ -1229,6 +1229,11 @@ public abstract class GeckoApp
|
|||
GeckoThread.ensureInit(args, action,
|
||||
TextUtils.isEmpty(uri) ? null : uri,
|
||||
/* debugging */ ACTION_DEBUG.equals(action));
|
||||
|
||||
if (!TextUtils.isEmpty(uri)) {
|
||||
// Start a speculative connection as soon as Gecko loads.
|
||||
GeckoThread.speculativeConnect(uri);
|
||||
}
|
||||
}
|
||||
|
||||
// GeckoThread has to register for "Gecko:Ready" first, so GeckoApp registers
|
||||
|
|
|
@ -78,9 +78,6 @@ BrowserCLH.prototype = {
|
|||
if (!uri)
|
||||
return;
|
||||
|
||||
// Let's get a head start on opening the network connection to the URI we are about to load
|
||||
Services.io.QueryInterface(Ci.nsISpeculativeConnect).speculativeConnect(uri, null);
|
||||
|
||||
let browserWin = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
if (browserWin) {
|
||||
let whereFlags = pinned ? Ci.nsIBrowserDOMWindow.OPEN_SWITCHTAB : Ci.nsIBrowserDOMWindow.OPEN_NEWTAB;
|
||||
|
|
Загрузка…
Ссылка в новой задаче