Backed out 8 changesets (bug 1598516) for run startup hangs CLOSED TREE
Backed out changeset bc0035aa57fe (bug 1598516) Backed out changeset 33603b723337 (bug 1598516) Backed out changeset 31c11dd9146d (bug 1598516) Backed out changeset 4e269a638350 (bug 1598516) Backed out changeset 76b86080c868 (bug 1598516) Backed out changeset b6f84b01cbd9 (bug 1598516) Backed out changeset 74d136798dd3 (bug 1598516) Backed out changeset bf370938463e (bug 1598516)
This commit is contained in:
@@ -3687,9 +3687,6 @@ NS_IMETHODIMP
|
||||
nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
const char16_t* aURL, nsIChannel* aFailedChannel,
|
||||
bool* aDisplayedErrorPage) {
|
||||
MOZ_LOG(gDocShellLeakLog, LogLevel::Debug,
|
||||
("DOCSHELL %p DisplayLoadError %s\n", this,
|
||||
aURI ? aURI->GetSpecOrDefault().get() : ""));
|
||||
// If we have a cross-process parent document, we must notify it that we no
|
||||
// longer block its load event. This is necessary for OOP sub-documents
|
||||
// because error documents do not result in a call to
|
||||
@@ -6217,9 +6214,6 @@ nsDocShell::OnContentBlockingEvent(nsIWebProgress* aWebProgress,
|
||||
|
||||
nsresult nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
|
||||
nsIChannel* aChannel, nsresult aStatus) {
|
||||
MOZ_LOG(gDocShellLeakLog, LogLevel::Debug,
|
||||
("DOCSHELL %p EndPageLoad status: %" PRIx32 "\n", this,
|
||||
static_cast<uint32_t>(aStatus)));
|
||||
if (!aChannel) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
@@ -6559,7 +6553,6 @@ nsresult nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
|
||||
aStatus == NS_ERROR_PROXY_CONNECTION_REFUSED ||
|
||||
aStatus == NS_ERROR_PROXY_AUTHENTICATION_FAILED ||
|
||||
aStatus == NS_ERROR_PROXY_TOO_MANY_REQUESTS ||
|
||||
aStatus == NS_ERROR_MALFORMED_URI ||
|
||||
aStatus == NS_ERROR_BLOCKED_BY_POLICY) &&
|
||||
(isTopFrame || UseErrorPages())) {
|
||||
DisplayLoadError(aStatus, url, nullptr, aChannel);
|
||||
@@ -9519,11 +9512,9 @@ static bool IsConsideredSameOriginForUIR(nsIPrincipal* aTriggeringPrincipal,
|
||||
}
|
||||
|
||||
static bool SchemeUsesDocChannel(nsIURI* aURI) {
|
||||
return !SchemeIsJavascript(aURI) && !SchemeIsViewSource(aURI) &&
|
||||
!NS_IsAboutBlank(aURI) &&
|
||||
!aURI->GetSpecOrDefault().EqualsLiteral("about:printpreview") &&
|
||||
!aURI->GetSpecOrDefault().EqualsLiteral("about:privatebrowsing") &&
|
||||
!aURI->GetSpecOrDefault().EqualsLiteral("about:crashcontent");
|
||||
return SchemeIsHTTP(aURI) || SchemeIsHTTPS(aURI) || aURI->SchemeIs("moz") ||
|
||||
SchemeIsData(aURI) || SchemeIsFile(aURI) || SchemeIsFTP(aURI) ||
|
||||
SchemeIsBlob(aURI);
|
||||
}
|
||||
|
||||
/* static */ bool nsDocShell::CreateChannelForLoadState(
|
||||
@@ -9532,16 +9523,8 @@ static bool SchemeUsesDocChannel(nsIURI* aURI) {
|
||||
const nsString* aInitiatorType, nsLoadFlags aLoadFlags, uint32_t aLoadType,
|
||||
uint32_t aCacheKey, bool aIsActive, bool aIsTopLevelDoc,
|
||||
bool aHasNonEmptySandboxingFlags, nsresult& aRv, nsIChannel** aChannel) {
|
||||
nsAutoString srcdoc;
|
||||
bool isSrcdoc = aLoadState->HasLoadFlags(INTERNAL_LOAD_FLAGS_IS_SRCDOC);
|
||||
if (isSrcdoc) {
|
||||
srcdoc = aLoadState->SrcdocData();
|
||||
} else {
|
||||
srcdoc = VoidString();
|
||||
}
|
||||
|
||||
if (StaticPrefs::browser_tabs_documentchannel() && XRE_IsContentProcess() &&
|
||||
SchemeUsesDocChannel(aLoadState->URI()) && !isSrcdoc) {
|
||||
SchemeUsesDocChannel(aLoadState->URI())) {
|
||||
RefPtr<DocumentChannelChild> child = new DocumentChannelChild(
|
||||
aLoadState, aLoadInfo, aInitiatorType, aLoadFlags, aLoadType, aCacheKey,
|
||||
aIsActive, aIsTopLevelDoc, aHasNonEmptySandboxingFlags);
|
||||
@@ -9552,6 +9535,14 @@ static bool SchemeUsesDocChannel(nsIURI* aURI) {
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
nsAutoString srcdoc;
|
||||
bool isSrcdoc = aLoadState->HasLoadFlags(INTERNAL_LOAD_FLAGS_IS_SRCDOC);
|
||||
if (isSrcdoc) {
|
||||
srcdoc = aLoadState->SrcdocData();
|
||||
} else {
|
||||
srcdoc = VoidString();
|
||||
}
|
||||
|
||||
nsIURI* baseURI = aLoadState->BaseURI();
|
||||
if (!isSrcdoc) {
|
||||
aRv = NS_NewChannelInternal(getter_AddRefs(channel), aLoadState->URI(),
|
||||
|
||||
Reference in New Issue
Block a user