Bug 1621307 - Remove Geturi in txMozillaStylesheetCompiler r=ckerschb

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sebastian Streich 2020-03-12 19:47:54 +00:00
parent 156f519842
commit 332641fa44

View File

@ -408,12 +408,10 @@ nsresult txCompileObserver::startLoad(nsIURI* aUri,
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));
if (httpChannel) {
nsCOMPtr<nsIURI> referrerURI;
aReferrerPrincipal->GetURI(getter_AddRefs(referrerURI));
if (referrerURI) {
DebugOnly<nsresult> rv;
nsCOMPtr<nsIReferrerInfo> referrerInfo =
new dom::ReferrerInfo(referrerURI, aReferrerPolicy);
nsCOMPtr<nsIReferrerInfo> referrerInfo;
nsresult rv = aReferrerPrincipal->CreateReferrerInfo(
aReferrerPolicy, getter_AddRefs(referrerInfo));
if (NS_SUCCEEDED(rv)) {
rv = httpChannel->SetReferrerInfoWithoutClone(referrerInfo);
MOZ_ASSERT(NS_SUCCEEDED(rv));
}