Bug 1535697 - Part 3: Only consider third-party tracking resources as isolated channels; r=michal

Differential Revision: https://phabricator.services.mozilla.com/D28373

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ehsan Akhgari 2019-04-29 17:09:39 +00:00
Родитель 3fcf2c3bae
Коммит dc946ab989
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -3898,8 +3898,9 @@ bool nsHttpChannel::IsIsolated() {
if (mHasBeenIsolatedChecked) {
return mIsIsolated;
}
mIsIsolated = !AntiTrackingCommon::IsFirstPartyStorageAccessGrantedFor(
this, mURI, nullptr);
mIsIsolated = IsThirdPartyTrackingResource() &&
!AntiTrackingCommon::IsFirstPartyStorageAccessGrantedFor(
this, mURI, nullptr);
mHasBeenIsolatedChecked = true;
return mIsIsolated;
}
@ -4023,7 +4024,7 @@ nsresult nsHttpChannel::OpenCacheEntryInternal(
extension.Append("TRR");
}
if (IsThirdPartyTrackingResource() && IsIsolated()) {
if (IsIsolated()) {
nsCOMPtr<nsIURI> topWindowURI;
rv = GetTopWindowURI(getter_AddRefs(topWindowURI));
bool isDocument = false;