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-27 01:34:32 +00:00
Родитель f2113beb89
Коммит a709cc3a40
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;