Backed out changeset 0cecdb107e91 (bug 1162036) for e10s browser_privatebrowsing_DownloadLastDirWithCPS.js failures.

CLOSED TREE

--HG--
extra : rebase_source : d9021ec4b0e810314138858194a56f4479edf21d
This commit is contained in:
Ryan VanderMeulen 2015-05-06 12:07:00 -04:00
parent 80553d32fb
commit 8c304a4876

View File

@ -1258,13 +1258,11 @@ let SessionStoreInternal = {
LastSession.clear();
let openWindows = {};
this._forEachBrowserWindow(function(aWindow) {
let tabs = aWindow.gBrowser.tabs;
// Remove pending or restoring tabs instead of just emptying them.
for (let i = tabs.length - 1; i >= 0; i--) {
if (tabs[i].linkedBrowser.__SS_restoreState) {
aWindow.gBrowser.removeTab(tabs[i], {animate: false});
}
}
Array.forEach(aWindow.gBrowser.tabs, function(aTab) {
delete aTab.linkedBrowser.__SS_data;
if (aTab.linkedBrowser.__SS_restoreState)
this._resetTabRestoringState(aTab);
}, this);
openWindows[aWindow.__SSi] = true;
});
// also clear all data about closed tabs and windows
@ -1275,9 +1273,6 @@ let SessionStoreInternal = {
delete this._windows[ix];
}
}
// Remove all pointers so that pending/restoring tabs that were closed
// above do not end up in _closedTabs[] again.
this._closedTabs.clear();
// also clear all data about closed windows
this._closedWindows = [];
// give the tabbrowsers a chance to clear their histories first