Bug 1546884 - fix third-party channel checks; r=dragana
authorLiang-Heng Chen <xeonchen@gmail.com>
Fri, 26 Apr 2019 09:29:07 +0000
changeset 530315 010e3e33937759bb284eee7570117afa2cb9c331
parent 530314 93e934e867c5955fe22d8c5baf19a805a4317ea1
child 530316 1deca82dd3f32b6c190a5e647812489c6b0c0845
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdragana
bugs1546884
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1546884 - fix third-party channel checks; r=dragana `mThirdPartyClassificationFlags` can only check for third-party tracking channel, it should be checked by calling `IsThirdPartyWindowOrChannel`. Differential Revision: https://phabricator.services.mozilla.com/D28788
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -1328,17 +1328,18 @@ HttpTrafficCategory nsHttpChannel::Creat
       cos = HttpTrafficAnalyzer::ClassOfService::eLeader;
     } else if (mLoadFlags & nsIRequest::LOAD_BACKGROUND) {
       cos = HttpTrafficAnalyzer::ClassOfService::eBackground;
     } else {
       cos = HttpTrafficAnalyzer::ClassOfService::eOther;
     }
   }
 
-  bool isThirdParty = !!mThirdPartyClassificationFlags;
+  bool isThirdParty =
+      nsContentUtils::IsThirdPartyWindowOrChannel(nullptr, this, mURI);
   HttpTrafficAnalyzer::TrackingClassification tc;
   {
     uint32_t flags = isThirdParty ? mThirdPartyClassificationFlags
                                   : mFirstPartyClassificationFlags;
 
     using CF = nsIHttpChannel::ClassificationFlags;
     using TC = HttpTrafficAnalyzer::TrackingClassification;