Closed Bug 1588220 Opened 2 years ago Closed 2 years ago

Only last active inner window should be reported as current after a BrowsingContext is discarded


(Core :: DOM: Navigation, defect, P2)




Fission Milestone M5
Tracking Status
firefox73 --- fixed


(Reporter: kmag, Assigned: kmag)




(1 file)

After a BrowsingContext is discarded, it drops its reference to its DocShell, and loses track of what its last active inner window was. Since inner windows still sometimes need to behave slightly differently when their BC was discarded while they were still the active inner window vs. when they were not, bug 1583400 works around this by simply checking if an inner window is current relative to its BrowsingContext if its BC has not been discarded, and whether it is current relative to its outer if it has not. This is more correct than always checking relative to its outer, but still incorrect when the outer window was not the active window for the BrowsingContext when it was discarded.

Any number of outer windows may be attached to a BrowsingContext over its
lifetime. While the BrowsingContext is alive, it's easy to keep track of which
of these is active, and therefore which of its inner windows is active. After
it has been discarded, though, it discards its docShell reference, so all we
can tell about an inner window is whether it is active for its own outer
window, but not whether it should be considered active for its

This patch updates the BrowsingContext detach logic to store a flag on the
current inner window recording that it was active when its BrowsingContext was
detached, and then later checks that flag to determine if it is the current
window for a detached BrowsingContext.

Priority: -- → P2
Pushed by
Keep track of last active inner window when BrowsingContext is discarded. r=bzbarsky
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Regressions: 1592765
Regressions: 1592767
Regressions: 1592741
Regressions: 1592862
Regressions: 1592791
Regressions: 1592835

Tentatively moving all bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to the "?" triage milestone.

This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:


Fission Milestone: --- → ?

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:kmag, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(kmaglione+bmo)
Fission Milestone: ? → M5
Pushed by
Keep track of last active inner window when BrowsingContext is discarded. r=bzbarsky
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73

Kris landed the patch.

Flags: needinfo?(kmaglione+bmo)
You need to log in before you can comment on or make changes to this bug.