Bug 1637739 - Use AntiTrackingUtils::IsThirdPartyChannel() in UrlClassifierCommon::AnnotateChannel(). r=dimi
authorTim Huang <tihuang@mozilla.com>
Wed, 13 May 2020 22:25:13 +0000
changeset 529797 30592bb5c5a647ff1072aec283f4497e259d7f91
parent 529796 f1e8a2272911635d8e43d7845db12c129a6a6bf6
child 529798 c8a0b94a51658d3cee7234b1cd91c7444efdddb3
push id37416
push usercsabou@mozilla.com
push dateThu, 14 May 2020 16:15:31 +0000
treeherdermozilla-central@80ba3f3cfaf9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdimi
bugs1637739
milestone78.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 1637739 - Use AntiTrackingUtils::IsThirdPartyChannel() in UrlClassifierCommon::AnnotateChannel(). r=dimi We used to use nsContentUtils::IsThirdPartyWindowOrChannel() to determine the third-party channel when annotate the channel in UrlClassifierCommon. Howeverm This is fission-incompatible. So, we change it to use AntiTrackingUtils::IsThirdPartyChannel() which is fission-compatible. Differential Revision: https://phabricator.services.mozilla.com/D75187
netwerk/url-classifier/UrlClassifierCommon.cpp
--- a/netwerk/url-classifier/UrlClassifierCommon.cpp
+++ b/netwerk/url-classifier/UrlClassifierCommon.cpp
@@ -425,17 +425,17 @@ void UrlClassifierCommon::AnnotateChanne
   if (NS_WARN_IF(NS_FAILED(rv))) {
     UC_LOG(
         ("UrlClassifierCommon::AnnotateChannel nsIChannel::GetURI(%p) failed",
          (void*)aChannel));
     return;
   }
 
   bool isThirdPartyWithTopLevelWinURI =
-      nsContentUtils::IsThirdPartyWindowOrChannel(nullptr, aChannel, chanURI);
+      AntiTrackingUtils::IsThirdPartyChannel(aChannel);
 
   UC_LOG(("UrlClassifierCommon::AnnotateChannel, annotating channel[%p]",
           aChannel));
 
   SetClassificationFlagsHelper(aChannel, aClassificationFlags,
                                isThirdPartyWithTopLevelWinURI);
 
   // We consider valid tracking flags (based on the current strict vs basic list