Bug 677424: If a tab is closed between quit-application-requested and quit-application-granted then it is still restored when the application restarts. r=zpao

This commit is contained in:
Dave Townsend 2011-08-11 19:35:48 -07:00
parent fb4bf0810e
commit 5f5332e1cd

View File

@ -1065,6 +1065,14 @@ SessionStoreService.prototype = {
if (length > maxTabsUndo)
this._windows[aWindow.__SSi]._closedTabs.splice(maxTabsUndo, length - maxTabsUndo);
}
// Remove the tab from the saved window state if it matches what is already
// there. This solves bug 677424
if (aTab._tPos < this._windows[aWindow.__SSi].tabs.length) {
var oldTab = this._windows[aWindow.__SSi].tabs[aTab._tPos];
if (oldTab.entries[oldTab.index - 1].url == aTab.linkedBrowser.currentURI.spec)
this._windows[aWindow.__SSi].tabs.splice(aTab._tPos, 1);
}
},
/**