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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user