Bug 1728605 - Part 2: Rename misleading {Window,Browsing}Context::IsCached, r=smaug

This method actually tracks whether the context is current, so it has been
renamed, and the behaviour has been inverted.

Depends on D124210

Differential Revision: https://phabricator.services.mozilla.com/D124211
This commit is contained in:
Nika Layzell
2021-09-02 14:15:04 +00:00
parent 23a18c5bb8
commit 9feface235
7 changed files with 14 additions and 19 deletions

View File

@@ -13051,7 +13051,7 @@ nsDocShell::GetAsyncPanZoomEnabled(bool* aOut) {
bool nsDocShell::HasUnloadedParent() {
for (WindowContext* wc = GetBrowsingContext()->GetParentWindowContext(); wc;
wc = wc->GetParentWindowContext()) {
if (wc->IsCached() || wc->IsDiscarded() ||
if (!wc->IsCurrent() || wc->IsDiscarded() ||
wc->GetBrowsingContext()->IsDiscarded()) {
// If a parent is OOP and the parent WindowContext is no
// longer current, we can assume the parent was unloaded.