Bug 1619602 - Part 2: Don't overwrite the existing ContentBlockingAllowListPrincipal when doing a recomputation in the Document. r=dimi,Ehsan
It is incorrect to overwrite the existing ContentBlockingAllowListPrincipal when doing a recomputaion in the Document. The ContentBlockingAllowListPrincipal in the document should be updated in Document::SetPrincipals(). Differential Revision: https://phabricator.services.mozilla.com/D65406
This commit is contained in:
@@ -162,8 +162,8 @@ ThirdPartyUtil::GetContentBlockingAllowListPrincipalFromWindow(
|
||||
OriginAttributes attrs =
|
||||
docShell ? nsDocShell::Cast(docShell)->GetOriginAttributes()
|
||||
: OriginAttributes();
|
||||
principal =
|
||||
doc->RecomputeContentBlockingAllowListPrincipal(aURIBeingLoaded, attrs);
|
||||
AntiTrackingCommon::RecomputeContentBlockingAllowListPrincipal(
|
||||
aURIBeingLoaded, attrs, getter_AddRefs(principal));
|
||||
}
|
||||
|
||||
if (!principal || !principal->GetIsContentPrincipal()) {
|
||||
|
||||
Reference in New Issue
Block a user