Bug 873556 - Add a timestamp to closedWindows and closedTabs. r=ttaubert

This commit is contained in:
Seif Lotfy 2014-01-08 09:39:53 -05:00
parent 775e123f73
commit e956b4db21

View File

@ -1035,6 +1035,11 @@ let SessionStoreInternal = {
winData._shouldRestore = true;
#endif
// Store the window's close date to figure out when each individual tab
// was closed. This timestamp should allow re-arranging data based on how
// recently something was closed.
winData.closedAt = Date.now();
// Save the window if it has multiple tabs or a single saveable tab and
// it's not private.
if (!winData.isPrivate && (winData.tabs.length > 1 ||
@ -1348,7 +1353,8 @@ let SessionStoreInternal = {
state: tabState,
title: tabTitle,
image: tabbrowser.getIcon(aTab),
pos: aTab._tPos
pos: aTab._tPos,
closedAt: Date.now()
});
var length = this._windows[aWindow.__SSi]._closedTabs.length;
if (length > this._max_tabs_undo)