Page MenuHomePhabricator

Bug 1790526 - Handle the discarded BrowsingContext that propagated to SessionStoreParent. r=smaug
ClosedPublic

Authored by edenchuang on Feb 11 2025, 11:37 AM.
Referenced Files
Unknown Object (File)
Thu, Oct 16, 2:25 PM
Unknown Object (File)
Tue, Oct 14, 1:31 AM
Unknown Object (File)
Tue, Oct 7, 10:24 AM
Unknown Object (File)
Tue, Sep 23, 7:18 AM
Unknown Object (File)
Sep 16 2025, 9:58 PM
Unknown Object (File)
Aug 2 2025, 1:33 AM
Unknown Object (File)
Jun 25 2025, 9:42 AM
Unknown Object (File)
May 30 2025, 12:30 PM
Subscribers

Details

Summary

According to the Pernosco trace, https://static.pernos.co/server/7c640bc4ed587e824fab0ca8aa44f41d1b5595b5/rebuilding.html?redirect=https%3A%2F%2Fpernos.co%2Fdebug%2FAKTDVC62g_oHMo8GmtoA1g%2Findex.html, this is a case that the propagated BrowingContext has been discarded already, so it causes aBrowsingContext.GetMaybeDiscarded() get a nullptr.

This patch just check if the propageted BrowsingContext is discarded.
For the discarded BrowsingContext, try to use its BrowsingContextId to get the corresponding CanonicalBrowsingContext instead of using the propagated one.

Diff Detail

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
peterv requested changes to this revision.Feb 12 2025, 4:02 PM
peterv added inline comments.
toolkit/components/sessionstore/SessionStoreParent.cpp
201–213

I'd rather do this instead.

229
This revision now requires changes to proceed.Feb 12 2025, 4:02 PM
edenchuang updated this revision to Diff 990108.
edenchuang edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Mar 17 2025, 10:02 AM

This revision requires a Testing Policy Project Tag to be set before landing. Please apply one of testing-approved, testing-exception-unchanged, testing-exception-ui, testing-exception-elsewhere, testing-exception-other. Tip: this Firefox add-on makes it easy!

This revision is now accepted and ready to land.Mar 17 2025, 11:22 AM
edenchuang retitled this revision from Bug 1790526 - Check if the propagated BrowsingContext is discarded or not in SessionStoreParent. r=peterv to Bug 1790526 - Handle the discarded BrowsingContext that propagated to SessionStoreParent. r=smaug.
edenchuang edited the summary of this revision. (Show Details)