Bug 1625568 - Add compatibility heuristics to third-party cookie blocking - part 5 - extra code to enable heuristics, r=timhuang

Differential Revision: https://phabricator.services.mozilla.com/D69355
This commit is contained in:
Andrea Marchesini
2020-04-02 14:59:44 +00:00
parent 78a7c29ec7
commit dda9dc8015
4 changed files with 42 additions and 13 deletions

View File

@@ -172,8 +172,8 @@ nsCString ImageCacheKey::GetTopLevelBaseDomain(Document* aDocument,
// If the window is 3rd party resource, let's see if first-party storage
// access is granted for this image.
if (nsContentUtils::IsThirdPartyTrackingResourceWindow(
aDocument->GetInnerWindow())) {
if (nsContentUtils::IsThirdPartyWindowOrChannel(aDocument->GetInnerWindow(),
nullptr, nullptr)) {
return StorageDisabledByAntiTracking(aDocument, aURI)
? aDocument->GetBaseDomain()
: EmptyCString();