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:
Serban Stanca
2025-05-21 16:28:52 +03:00
committed by sstanca@mozilla.com
parent 6d6c598acb
commit 071240c3d9
20 changed files with 75 additions and 136 deletions

View File

@@ -727,13 +727,10 @@ static bool ShouldLoadCachedImage(imgRequest* aImgRequest,
loadingPrincipal = NullPrincipal::CreateWithoutOriginAttributes();
}
Result<RefPtr<LoadInfo>, nsresult> maybeLoadInfo = LoadInfo::Create(
nsCOMPtr<nsILoadInfo> secCheckLoadInfo = new LoadInfo(
loadingPrincipal, aTriggeringPrincipal, aLoadingDocument,
nsILoadInfo::SEC_ONLY_FOR_EXPLICIT_CONTENTSEC_CHECK, aPolicyType);
if (NS_WARN_IF(maybeLoadInfo.isErr())) {
return false;
}
RefPtr<LoadInfo> secCheckLoadInfo = maybeLoadInfo.unwrap();
secCheckLoadInfo->SetSendCSPViolationEvents(aSendCSPViolationReports);
int16_t decision = nsIContentPolicy::REJECT_REQUEST;