no-bug: Make checks on new BC

This commit is contained in:
Mr. M
2026-04-17 00:53:21 +02:00
parent 3cf06a4c85
commit 16b9bbc8ab

View File

@@ -287,8 +287,13 @@ auto nsZenBoostsBackend::onPresShellEntered(mozilla::dom::Document* aDocument)
// Note that aDocument can be null when entering anonymous content frames.
// We explicitly do this to prevent applying boosts to anonymous content, such
// as devtools or screenshots.
mozilla::dom::BrowsingContext* browsingContext =
mCurrentBrowsingContext =
aDocument ? aDocument->GetBrowsingContext() : nullptr;
if (!browsingContext) {
return;
}
mCurrentBrowsingContext = browsingContext;
}
[[nodiscard]] ZEN_HOT_FUNCTION auto