diff --git a/browser/components/sessionstore/src/SessionStore.jsm b/browser/components/sessionstore/src/SessionStore.jsm index 08e0f7a74e76..66de9c72e0b9 100644 --- a/browser/components/sessionstore/src/SessionStore.jsm +++ b/browser/components/sessionstore/src/SessionStore.jsm @@ -1059,7 +1059,6 @@ let SessionStoreInternal = { this._forEachBrowserWindow(function(aWindow) { Array.forEach(aWindow.gBrowser.tabs, function(aTab) { delete aTab.linkedBrowser.__SS_data; - delete aTab.linkedBrowser.__SS_tabStillLoading; delete aTab.linkedBrowser.__SS_formDataSaved; delete aTab.linkedBrowser.__SS_hostSchemeData; if (aTab.linkedBrowser.__SS_restoreState) @@ -1251,7 +1250,6 @@ let SessionStoreInternal = { MESSAGES.forEach(msg => mm.removeMessageListener(msg, this)); delete browser.__SS_data; - delete browser.__SS_tabStillLoading; delete browser.__SS_formDataSaved; delete browser.__SS_hostSchemeData; @@ -1329,7 +1327,6 @@ let SessionStoreInternal = { } delete aBrowser.__SS_data; - delete aBrowser.__SS_tabStillLoading; delete aBrowser.__SS_formDataSaved; this.saveStateDelayed(aWindow); @@ -1887,7 +1884,7 @@ let SessionStoreInternal = { if (!browser || !browser.currentURI) // can happen when calling this function right after .addTab() return tabData; - else if (browser.__SS_data && browser.__SS_tabStillLoading) { + else if (browser.__SS_data) { // use the data to be restored when the tab hasn't been completely loaded tabData = browser.__SS_data; if (aTab.pinned) @@ -1912,16 +1909,7 @@ let SessionStoreInternal = { } catch (ex) { } // this could happen if we catch a tab during (de)initialization - // XXXzeniko anchor navigation doesn't reset __SS_data, so we could reuse - // data even when we shouldn't (e.g. Back, different anchor) - if (history && browser.__SS_data && - browser.__SS_data.entries[history.index] && - browser.__SS_data.entries[history.index].url == browser.currentURI.spec && - history.index < this._sessionhistory_max_entries - 1 && !aFullData) { - tabData = browser.__SS_data; - tabData.index = history.index + 1; - } - else if (history && history.count > 0) { + if (history && history.count > 0) { browser.__SS_hostSchemeData = []; try { for (var j = 0; j < history.count; j++) { @@ -1950,10 +1938,6 @@ let SessionStoreInternal = { } } tabData.index = history.index + 1; - - // make sure not to cache privacy sensitive data which shouldn't get out - if (!aFullData) - browser.__SS_data = tabData; } else if (browser.currentURI.spec != "about:blank" || browser.contentDocument.body.hasChildNodes()) { @@ -2180,7 +2164,7 @@ let SessionStoreInternal = { _updateTextAndScrollDataForTab: function ssi_updateTextAndScrollDataForTab(aWindow, aBrowser, aTabData, aFullData) { // we shouldn't update data for incompletely initialized tabs - if (aBrowser.__SS_data && aBrowser.__SS_tabStillLoading) + if (aBrowser.__SS_data) return; var tabIndex = (aTabData.index || aTabData.entries.length) - 1; @@ -2984,8 +2968,6 @@ let SessionStoreInternal = { for (let name in tabData.attributes) this.xulAttributes[name] = true; - browser.__SS_tabStillLoading = true; - // keep the data around to prevent dataloss in case // a tab gets closed before it's been properly restored browser.__SS_data = tabData; @@ -4095,15 +4077,13 @@ let SessionStoreInternal = { /** * Determine if we can restore history into this tab. * This will be false when a tab has been removed (usually between - * restoreHistoryPrecursor && restoreHistory) or if the tab is still marked - * as loading. + * restoreHistoryPrecursor && restoreHistory). * * @param aTab * @returns boolean */ _canRestoreTabHistory: function ssi_canRestoreTabHistory(aTab) { - return aTab.parentNode && aTab.linkedBrowser && - aTab.linkedBrowser.__SS_tabStillLoading; + return aTab.parentNode && aTab.linkedBrowser; }, /** diff --git a/browser/components/sessionstore/test/browser_579868.js b/browser/components/sessionstore/test/browser_579868.js index 683ead7c3e31..b6be39295d60 100644 --- a/browser/components/sessionstore/test/browser_579868.js +++ b/browser/components/sessionstore/test/browser_579868.js @@ -17,9 +17,7 @@ function test() { // Undo pinning gBrowser.unpinTab(tab1); - - is(tab1.linkedBrowser.__SS_tabStillLoading, true, - "_tabStillLoading should be true."); + ok("__SS_data" in tab1.linkedBrowser, "tab should still be loading"); // Close and restore tab gBrowser.removeTab(tab1); diff --git a/browser/components/sessionstore/test/browser_625257.js b/browser/components/sessionstore/test/browser_625257.js index 6f687755d2ce..7482efc1c73c 100644 --- a/browser/components/sessionstore/test/browser_625257.js +++ b/browser/components/sessionstore/test/browser_625257.js @@ -39,7 +39,6 @@ function firstOnLoad(aEvent) { ss.getBrowserState(); is(gBrowser.tabs[1], tab, "newly created tab should exist by now"); - ok(tab.linkedBrowser.__SS_data, "newly created tab should be in save state"); tab.linkedBrowser.loadURI(URI_TO_LOAD); }