Backed out changeset f768135b85f2 (bug 1746524) for causing perf regressions

This commit is contained in:
Narcis Beleuzu 2023-11-30 18:18:17 +02:00
parent 29e80ac522
commit 721c07ce9e
2 changed files with 19 additions and 21 deletions

View file

@ -2188,18 +2188,6 @@ bool CanonicalBrowsingContext::HasCreatedMediaController() const {
bool CanonicalBrowsingContext::SupportsLoadingInParent(
nsDocShellLoadState* aLoadState, uint64_t* aOuterWindowId) {
// We only support parent controlled navigation with Fission.
if (!StaticPrefs::browser_tabs_documentchannel_parent_controlled() ||
!mozilla::FissionAutostart()) {
return false;
}
// We currently only support starting loads directly from the
// CanonicalBrowsingContext for top-level BCs.
if (!IsTopContent() || !GetContentParent()) {
return false;
}
// We currently don't support initiating loads in the parent when they are
// watched by devtools. This is because devtools tracks loads using content
// process notifications, which happens after the load is initiated in this
@ -2250,6 +2238,15 @@ bool CanonicalBrowsingContext::SupportsLoadingInParent(
bool CanonicalBrowsingContext::LoadInParent(nsDocShellLoadState* aLoadState,
bool aSetNavigating) {
// We currently only support starting loads directly from the
// CanonicalBrowsingContext for top-level BCs.
// We currently only support starting loads directly from the
// CanonicalBrowsingContext for top-level BCs.
if (!IsTopContent() || !GetContentParent() ||
!StaticPrefs::browser_tabs_documentchannel_parent_controlled()) {
return false;
}
uint64_t outerWindowId = 0;
if (!SupportsLoadingInParent(aLoadState, &outerWindowId)) {
return false;
@ -2269,9 +2266,17 @@ bool CanonicalBrowsingContext::LoadInParent(nsDocShellLoadState* aLoadState,
bool CanonicalBrowsingContext::AttemptSpeculativeLoadInParent(
nsDocShellLoadState* aLoadState) {
// We currently only support starting loads directly from the
// CanonicalBrowsingContext for top-level BCs.
// We currently only support starting loads directly from the
// CanonicalBrowsingContext for top-level BCs.
if (!IsTopContent() || !GetContentParent() ||
(StaticPrefs::browser_tabs_documentchannel_parent_controlled())) {
return false;
}
uint64_t outerWindowId = 0;
if (!StaticPrefs::browser_tabs_documentchannel_speculative_load() ||
!SupportsLoadingInParent(aLoadState, &outerWindowId)) {
if (!SupportsLoadingInParent(aLoadState, &outerWindowId)) {
return false;
}

View file

@ -1620,13 +1620,6 @@
# If set, use DocumentChannel to directly initiate loads entirely
# from parent-process BrowsingContexts
- name: browser.tabs.documentchannel.parent-controlled
type: bool
value: true
mirror: always
# If set, use DocumentChannel to attempt a speculative load from the
# parent whenever it's not possible to directly load from the parent.
- name: browser.tabs.documentchannel.speculative-load
type: bool
value: false
mirror: always