mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1544534: Add carveout for NullPrincipal when asserting if explicit CSP and CSP on Principal are equal. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D27700 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
2cfb84082d
commit
aee4945e49
@ -9900,8 +9900,11 @@ nsresult nsDocShell::DoURILoad(nsDocShellLoadState* aLoadState,
|
||||
nsCOMPtr<nsIContentSecurityPolicy> csp;
|
||||
aLoadState->TriggeringPrincipal()->GetCsp(getter_AddRefs(csp));
|
||||
#ifdef DEBUG
|
||||
nsCOMPtr<nsIContentSecurityPolicy> argsCSP = aLoadState->Csp();
|
||||
MOZ_ASSERT(nsCSPContext::Equals(csp, argsCSP));
|
||||
if (!aLoadState->TriggeringPrincipal()->GetIsNullPrincipal()) {
|
||||
// After Bug 965637 we can remove that assertion anyway.
|
||||
nsCOMPtr<nsIContentSecurityPolicy> argsCSP = aLoadState->Csp();
|
||||
MOZ_ASSERT(nsCSPContext::Equals(csp, argsCSP));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (csp) {
|
||||
|
Loading…
Reference in New Issue
Block a user