Bug 1614959 - Remove ReqLocation in imgLoader r=ckerschb

Differential Revision: https://phabricator.services.mozilla.com/D62595

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sebastian Streich 2020-02-17 13:58:06 +00:00
parent 447d4f2f03
commit 891b2aa719

View File

@ -725,20 +725,13 @@ static bool ShouldLoadCachedImage(imgRequest* aImgRequest,
}
if (!aTriggeringPrincipal || !aTriggeringPrincipal->IsSystemPrincipal()) {
// Set the requestingLocation from the aTriggeringPrincipal.
nsCOMPtr<nsIURI> requestingLocation;
if (aTriggeringPrincipal) {
rv = aTriggeringPrincipal->GetURI(getter_AddRefs(requestingLocation));
NS_ENSURE_SUCCESS(rv, false);
}
// reset the decision for mixed content blocker check
decision = nsIContentPolicy::REJECT_REQUEST;
rv = nsMixedContentBlocker::ShouldLoad(
insecureRedirect, aPolicyType, contentLocation, requestingLocation,
aLoadingContext,
EmptyCString(), // mime guess
aTriggeringPrincipal, &decision);
rv = nsMixedContentBlocker::ShouldLoad(insecureRedirect, aPolicyType,
contentLocation, nullptr,
aLoadingContext,
EmptyCString(), // mime guess
aTriggeringPrincipal, &decision);
if (NS_FAILED(rv) || !NS_CP_ACCEPTED(decision)) {
return false;
}