From 891b2aa7199a6eca6fa441f9330aa93fb5f53030 Mon Sep 17 00:00:00 2001 From: Sebastian Streich Date: Mon, 17 Feb 2020 13:58:06 +0000 Subject: [PATCH] Bug 1614959 - Remove ReqLocation in imgLoader r=ckerschb Differential Revision: https://phabricator.services.mozilla.com/D62595 --HG-- extra : moz-landing-system : lando --- image/imgLoader.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/image/imgLoader.cpp b/image/imgLoader.cpp index 4b4021953742..489f855c9c36 100644 --- a/image/imgLoader.cpp +++ b/image/imgLoader.cpp @@ -725,20 +725,13 @@ static bool ShouldLoadCachedImage(imgRequest* aImgRequest, } if (!aTriggeringPrincipal || !aTriggeringPrincipal->IsSystemPrincipal()) { - // Set the requestingLocation from the aTriggeringPrincipal. - nsCOMPtr 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; }