SessionStore.restoreLastSession forgets flagged saved tab groups that the last session does not reopen
Categories
(Firefox :: Session Restore, defect, P2)
Tracking
()
People
(Reporter: mhynson, Assigned: mhynson)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fidefe-session-restore])
On a deferred startup, #prepDataForDeferredRestore turns open tab groups into saved groups and flags them removeAfterRestore. Then, if the user restores the last session, restoreLastSession reopens those groups and removes the saved copies by calling forgetSavedTabGroup on every group with the flag.
It does not check that lastSessionState actually contains an open group with that id. That is only safe while LastSession is still the deferred session that set the flags. The flags are only cleared on the next deferred startup.
LastSession can be replaced in between. In the taskbar-tab branch of #onClose, when the last regular window closes while a taskbar tab (web app) stays open, LastSession is set to getCurrentState(true). In that state, the flagged group is a saved group, not an open one.
Steps:
- Deferred startup turns open group G into a saved group with
removeAfterRestore. - Close the last regular window while a web app window stays open.
- Open a new window and choose "Restore Previous Session".
- G is not reopened, and it is deleted from saved groups for good.
| Assignee | ||
Updated•20 days ago
|
| Assignee | ||
Updated•20 days ago
|
| Assignee | ||
Comment 1•20 days ago
|
||
Proposed fix: only forget flagged groups whose ids appear in lastSessionState.windows[*].groups. Alternatively, clear the flags whenever LastSession is replaced or cleared. The first is narrower and easier to test.
Test plan (Marionette): use setup_taskbartab_restore_scenario and restore_last_session from session_store_test_case.py. Check that G is still in SessionStore.savedGroups after step 3. The test should fail on current code.
| Assignee | ||
Updated•15 days ago
|
Updated•15 days ago
|
| Assignee | ||
Updated•12 hours ago
|
Description
•