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:
Jim Chen 2015-08-19 18:14:47 -04:00
Родитель 192182c441
Коммит a800417633
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -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;