Bug 1954488: Delete removeAfterRestore property from savedGroups if the session is being quit for the second time r=dwalker,sthompson,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241978
This commit is contained in:
@@ -7002,6 +7002,17 @@ var SessionStoreInternal = {
|
||||
};
|
||||
state.selectedWindow = state.selectedWindow || 1;
|
||||
|
||||
// Fixes bug1954488
|
||||
// This solves a case where a user had open tab groups and then quit and
|
||||
// restarted the browser at least twice. In this case the saved groups
|
||||
// would still be marked as removeAfterRestore groups even though there was
|
||||
// no longer an open group associated with them in the lastSessionState.
|
||||
// To fix this we clear this property if we see it on saved groups,
|
||||
// converting them into permanently saved groups.
|
||||
for (let group of defaultState.savedGroups) {
|
||||
delete group.removeAfterRestore;
|
||||
}
|
||||
|
||||
// Look at each window, remove pinned tabs, adjust selectedindex,
|
||||
// remove window if necessary.
|
||||
for (let wIndex = 0; wIndex < state.windows.length; ) {
|
||||
|
||||
Reference in New Issue
Block a user