Bug 1329288: Allow content policy consumers to identify contentPolicy checks from docshell

This commit is contained in:
janekptacijarabaci 2018-04-22 20:38:02 +02:00 committed by Roy Tam
commit 9e52126f1a
3 changed files with 26 additions and 3 deletions

View file

@ -171,9 +171,10 @@ nsCSPContext::ShouldLoad(nsContentPolicyType aContentType,
}
}
// aExtra is only non-null if the channel got redirected.
bool wasRedirected = (aExtra != nullptr);
// aExtra holds the original URI of the channel if the
// channel got redirected (until we fix Bug 1332422).
nsCOMPtr<nsIURI> originalURI = do_QueryInterface(aExtra);
bool wasRedirected = originalURI;
bool permitted = permitsInternal(dir,
aContentLocation,