Bug 1418009 - Avoid speculative connections on prematurely inserted lazy tabs draft
authorOriol Brufau <oriol-bugzilla@hotmail.com>
Fri, 16 Mar 2018 16:58:36 +0100
changeset 768846 bbeae2b16fd469af951146e62c753d896ccf38af
parent 768313 16e69d4df5dcef04f1d3f4b6fcf9284d321bce6f
push id102987
push userbmo:oriol-bugzilla@hotmail.com
push dateFri, 16 Mar 2018 22:00:42 +0000
bugs1418009
milestone61.0a1
Bug 1418009 - Avoid speculative connections on prematurely inserted lazy tabs 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