Bug 1418009 - Avoid speculative connections on prematurely inserted lazy tabs r=dao
authorOriol Brufau <oriol-bugzilla@hotmail.com>
Fri, 16 Mar 2018 16:58:36 +0100
changeset 462207 6d67283033868a54d89a936ba5e336d9bad5c79c
parent 462206 5e2d471594610c72379d42d1cce2ff4c6484c5e3
child 462208 4939d44bcd0a4aafde8c480e1ba8a66a1f936c7e
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1418009
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1418009 - Avoid speculative connections on prematurely inserted lazy tabs r=dao MozReview-Commit-ID: 3T8PLBLEGNt
browser/components/sessionstore/SessionStore.jsm
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -3542,17 +3542,17 @@ var SessionStoreInternal = {
    * Make a connection to a host when users hover mouse on a tab.
    * This will also set a flag in the tab to prevent us from speculatively
    * connecting a second time.
    *
    * @param tab
    *        a tab to speculatively connect on mouse hover.
    */
   speculativeConnectOnTabHover(tab) {
-    if (this._restore_on_demand && !tab.__SS_connectionPrepared && tab.hasAttribute("pending")) {
+    if (tab.__SS_lazyData && !tab.__SS_connectionPrepared) {
       let url = this.getLazyTabValue(tab, "url");
       let prepared = this.prepareConnectionToHost(url);
       // This is used to test if a connection has been made beforehand.
       if (gDebuggingEnabled) {
         tab.__test_connection_prepared = prepared;
         tab.__test_connection_url = url;
       }
       // A flag indicate that we've prepared a connection for this tab and