Closed Bug 1705689 Opened 2 months ago Closed 1 hour ago

Investigate UpdateSessionStoreFromTablistener calls that happen on a replaced browsing context

Categories

(Firefox :: Session Restore, task)

task

Tracking

()

RESOLVED FIXED
91 Branch
Fission Milestone M8
Tracking Status
firefox91 --- fixed

People

(Reporter: kashav, Assigned: farre)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We sometimes call this on a replaced browsing context, which might be a bug. We should maybe switch to fetching the browsing context by BrowserId, to ensure we have the latest context.

We'll only want to run the SessionHistory code in this function if context == context.top, which won't be immediately possible to check if we switch to using BrowserId (since GetTopByBrowserId by definition returns the top), so we might have to update callers to do the check or give us BrowserId=0 for subframes.

The condition added in bug 1705547 might actually be sufficient to check that we're not calling collect() on a replaced context, since we'll clear the context's SessionHistory reference when replacing. We'll likely still need to run the TabState.update() code for a replaced context, but :farre can confirm.

Fission Milestone: --- → M8

Per meeting with nika: we should avoid updating the cache for replaced contexts as well.

Anny did some maybe-related work in bug 1707138. This might be the root cause of that issue, so we should look into merging the changes when working on this.

See Also: → 1707138
Assignee: nobody → afarre
Status: NEW → ASSIGNED
Pushed by afarre@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/29e77306d513
Don't update the tab state if the browsing context has been replaced. r=kashav
Status: ASSIGNED → RESOLVED
Closed: 1 hour ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.