зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
2cfb84082d
Коммит
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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче