Bug 1638711 - Update WindowGlobalParent's copy of ClientInfo when we mutate it on the window. r=nika

Differential Revision: https://phabricator.services.mozilla.com/D75721
This commit is contained in:
Matt Woodrow 2020-06-08 23:16:17 +00:00
Родитель 6ac3411051
Коммит 9b70f30f33
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -5479,6 +5479,10 @@ void nsGlobalWindowInner::SetCsp(nsIContentSecurityPolicy* aCsp) {
mClientSource->SetCsp(aCsp);
// Also cache the CSP within the document
mDoc->SetCsp(aCsp);
if (mWindowGlobalChild) {
mWindowGlobalChild->SendSetClientInfo(mClientSource->Info().ToIPC());
}
}
void nsGlobalWindowInner::SetPreloadCsp(nsIContentSecurityPolicy* aPreloadCsp) {
@ -5488,6 +5492,10 @@ void nsGlobalWindowInner::SetPreloadCsp(nsIContentSecurityPolicy* aPreloadCsp) {
mClientSource->SetPreloadCsp(aPreloadCsp);
// Also cache the preload CSP within the document
mDoc->SetPreloadCsp(aPreloadCsp);
if (mWindowGlobalChild) {
mWindowGlobalChild->SendSetClientInfo(mClientSource->Info().ToIPC());
}
}
nsIContentSecurityPolicy* nsGlobalWindowInner::GetCsp() {