Revert "Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw" for causing multiple failures.
This reverts commit b9a9491a35.
This commit is contained in:
committed by
sstanca@mozilla.com
parent
6d6c598acb
commit
071240c3d9
@@ -10555,17 +10555,15 @@ nsresult nsDocShell::DoURILoad(nsDocShellLoadState* aLoadState,
|
||||
mBrowsingContext->SetTriggeringAndInheritPrincipals(
|
||||
aLoadState->TriggeringPrincipal(), aLoadState->PrincipalToInherit(),
|
||||
aLoadState->GetLoadIdentifier());
|
||||
RefPtr<LoadInfo> loadInfo;
|
||||
if (contentPolicyType == nsIContentPolicy::TYPE_DOCUMENT) {
|
||||
loadInfo =
|
||||
new LoadInfo(loadingWindow, uri, aLoadState->TriggeringPrincipal(),
|
||||
topLevelLoadingContext, securityFlags, sandboxFlags);
|
||||
} else {
|
||||
loadInfo = MOZ_TRY(LoadInfo::Create(
|
||||
loadingPrincipal, aLoadState->TriggeringPrincipal(), loadingNode,
|
||||
securityFlags, contentPolicyType, Maybe<mozilla::dom::ClientInfo>(),
|
||||
Maybe<mozilla::dom::ServiceWorkerDescriptor>(), sandboxFlags));
|
||||
}
|
||||
RefPtr<LoadInfo> loadInfo =
|
||||
(contentPolicyType == nsIContentPolicy::TYPE_DOCUMENT)
|
||||
? new LoadInfo(loadingWindow, uri, aLoadState->TriggeringPrincipal(),
|
||||
topLevelLoadingContext, securityFlags, sandboxFlags)
|
||||
: new LoadInfo(loadingPrincipal, aLoadState->TriggeringPrincipal(),
|
||||
loadingNode, securityFlags, contentPolicyType,
|
||||
Maybe<mozilla::dom::ClientInfo>(),
|
||||
Maybe<mozilla::dom::ServiceWorkerDescriptor>(),
|
||||
sandboxFlags);
|
||||
RefPtr<WindowContext> context = mBrowsingContext->GetCurrentWindowContext();
|
||||
|
||||
if (isAboutBlankLoadOntoInitialAboutBlank) {
|
||||
|
||||
Reference in New Issue
Block a user