Closed Bug 2091727 Opened 14 days ago Closed 14 days ago

Recover from a tab that references a group its window does not define

Categories

(Firefox :: Session Restore, defect)

Firefox 161
defect

Tracking

()

RESOLVED DUPLICATE of bug 2083249

People

(Reporter: ndokutovich, Unassigned)

Details

Attachments

(1 obsolete file)

_collectWindowData() turns each open group into a saved group by looking a tab's groupId up in window.groups:

} else if (window.tabs[tIndex].groupId) {
  let groupStateToSave = window.groups.find(
    groupState => groupState.id == window.tabs[tIndex].groupId
  );
  let groupToSave = groupsToSave.get(groupStateToSave.id);

A tab whose groupId matches no group in window.groups makes find() return undefined and the next line throw, so the window state is never collected.

We do not yet know how a tab ends up referencing a group its window does not define; that is being investigated separately (with telemetry on group IDs). Until the cause is found, recover rather than throw: drop the tab's groupId so it is collected as an ordinary tab.

Test: browser/components/sessionstore/test/marionette/test_saved_groups_survive_unusable_session.py

#prepDataForDeferredRestore() turns each open group into a saved group by
looking a tab's groupId up in window.groups. A tab whose groupId matched no
group made find() return undefined and the next line throw, so the deferred
restore never completed.

We do not yet know how a tab ends up referencing a group its window does not
define; that is being investigated separately. Until the cause is found,
recover rather than throw: drop the tab's groupId so it is collected as an
ordinary tab.

Duplicate of Bug 2083249 (D338055 'Drop tab group references that do not resolve on load'), which already drops dangling group references at the entry points. Closing as duplicate.

Status: UNCONFIRMED → RESOLVED
Closed: 14 days ago
Duplicate of bug: 2083249
Resolution: --- → DUPLICATE
Attachment #9679436 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: