forked from mirrors/gecko-dev
Backed out changeset f768135b85f2 (bug 1746524) for causing perf regressions
This commit is contained in:
parent
29e80ac522
commit
721c07ce9e
2 changed files with 19 additions and 21 deletions
|
|
@ -2188,18 +2188,6 @@ bool CanonicalBrowsingContext::HasCreatedMediaController() const {
|
||||||
|
|
||||||
bool CanonicalBrowsingContext::SupportsLoadingInParent(
|
bool CanonicalBrowsingContext::SupportsLoadingInParent(
|
||||||
nsDocShellLoadState* aLoadState, uint64_t* aOuterWindowId) {
|
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
|
// We currently don't support initiating loads in the parent when they are
|
||||||
// watched by devtools. This is because devtools tracks loads using content
|
// watched by devtools. This is because devtools tracks loads using content
|
||||||
// process notifications, which happens after the load is initiated in this
|
// process notifications, which happens after the load is initiated in this
|
||||||
|
|
@ -2250,6 +2238,15 @@ bool CanonicalBrowsingContext::SupportsLoadingInParent(
|
||||||
|
|
||||||
bool CanonicalBrowsingContext::LoadInParent(nsDocShellLoadState* aLoadState,
|
bool CanonicalBrowsingContext::LoadInParent(nsDocShellLoadState* aLoadState,
|
||||||
bool aSetNavigating) {
|
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;
|
uint64_t outerWindowId = 0;
|
||||||
if (!SupportsLoadingInParent(aLoadState, &outerWindowId)) {
|
if (!SupportsLoadingInParent(aLoadState, &outerWindowId)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -2269,9 +2266,17 @@ bool CanonicalBrowsingContext::LoadInParent(nsDocShellLoadState* aLoadState,
|
||||||
|
|
||||||
bool CanonicalBrowsingContext::AttemptSpeculativeLoadInParent(
|
bool CanonicalBrowsingContext::AttemptSpeculativeLoadInParent(
|
||||||
nsDocShellLoadState* aLoadState) {
|
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;
|
uint64_t outerWindowId = 0;
|
||||||
if (!StaticPrefs::browser_tabs_documentchannel_speculative_load() ||
|
if (!SupportsLoadingInParent(aLoadState, &outerWindowId)) {
|
||||||
!SupportsLoadingInParent(aLoadState, &outerWindowId)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1620,13 +1620,6 @@
|
||||||
# If set, use DocumentChannel to directly initiate loads entirely
|
# If set, use DocumentChannel to directly initiate loads entirely
|
||||||
# from parent-process BrowsingContexts
|
# from parent-process BrowsingContexts
|
||||||
- name: browser.tabs.documentchannel.parent-controlled
|
- 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
|
type: bool
|
||||||
value: false
|
value: false
|
||||||
mirror: always
|
mirror: always
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue