Bug 1535799 - nsIHttpChannel.isTrackingResource should be a method, r=Ehsan
authorAndrea Marchesini <amarchesini@mozilla.com>
Sun, 17 Mar 2019 06:55:50 +0000
changeset 522390 8ee97c045359ecd958e1032b0d6617741f20cf00
parent 522389 37761497b6c1c9f52f9bb526892274fe6ac0fb7b
child 522597 e0861be8d6c0fff8066fc5fe39e720dc55524122
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersEhsan
bugs1535799
milestone67.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 1535799 - nsIHttpChannel.isTrackingResource should be a method, r=Ehsan Differential Revision: https://phabricator.services.mozilla.com/D23765
devtools/server/actors/network-monitor/network-observer.js
dom/base/nsContentUtils.cpp
dom/html/nsHTMLDocument.cpp
dom/script/ScriptLoader.cpp
netwerk/cookie/CookieServiceChild.cpp
netwerk/cookie/CookieServiceParent.cpp
netwerk/cookie/nsCookieService.cpp
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/HttpBaseChannel.h
netwerk/protocol/http/NullHttpChannel.cpp
netwerk/protocol/http/nsIHttpChannel.idl
netwerk/protocol/viewsource/nsViewSourceChannel.cpp
netwerk/test/unit/test_trackingProtection_annotateChannels.js
toolkit/components/antitracking/AntiTrackingCommon.cpp
toolkit/components/url-classifier/tests/mochitest/features.js
--- a/devtools/server/actors/network-monitor/network-observer.js
+++ b/devtools/server/actors/network-monitor/network-observer.js
@@ -489,17 +489,17 @@ NetworkObserver.prototype = {
     event.url = channel.URI.spec;
     event.private = httpActivity.private;
     event.headersSize = 0;
     event.startedDateTime =
       (timestamp ? new Date(Math.round(timestamp / 1000)) : new Date())
       .toISOString();
     event.fromCache = fromCache;
     event.fromServiceWorker = fromServiceWorker;
-    event.isThirdPartyTrackingResource = channel.isThirdPartyTrackingResource;
+    event.isThirdPartyTrackingResource = channel.isThirdPartyTrackingResource();
     event.referrerPolicy =
       Services.netUtils.getReferrerPolicyString(channel.referrerPolicy);
     httpActivity.fromServiceWorker = fromServiceWorker;
 
     if (extraStringData) {
       event.headersSize = extraStringData.length;
     }
 
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -8323,17 +8323,17 @@ bool nsContentUtils::IsTrackingResourceW
   }
 
   nsCOMPtr<nsIHttpChannel> httpChannel =
       do_QueryInterface(document->GetChannel());
   if (!httpChannel) {
     return false;
   }
 
-  return httpChannel->GetIsTrackingResource();
+  return httpChannel->IsTrackingResource();
 }
 
 // static public
 bool nsContentUtils::IsThirdPartyTrackingResourceWindow(
     nsPIDOMWindowInner* aWindow) {
   MOZ_ASSERT(aWindow);
 
   Document* document = aWindow->GetExtantDoc();
@@ -8342,17 +8342,17 @@ bool nsContentUtils::IsThirdPartyTrackin
   }
 
   nsCOMPtr<nsIHttpChannel> httpChannel =
       do_QueryInterface(document->GetChannel());
   if (!httpChannel) {
     return false;
   }
 
-  return httpChannel->GetIsThirdPartyTrackingResource();
+  return httpChannel->IsThirdPartyTrackingResource();
 }
 
 static bool StorageDisabledByAntiTrackingInternal(nsPIDOMWindowInner* aWindow,
                                                   nsIChannel* aChannel,
                                                   nsIPrincipal* aPrincipal,
                                                   nsIURI* aURI,
                                                   uint32_t& aRejectedReason) {
   MOZ_ASSERT(aWindow || aChannel || aPrincipal);
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -995,17 +995,17 @@ already_AddRefed<nsIChannel> nsHTMLDocum
   nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(docShell);
   if (!pbChannel || !loadContext) {
     return nullptr;
   }
   pbChannel->SetPrivate(loadContext->UsePrivateBrowsing());
 
   nsCOMPtr<nsIHttpChannel> docHTTPChannel = do_QueryInterface(GetChannel());
   if (docHTTPChannel) {
-    bool isTracking = docHTTPChannel->GetIsTrackingResource();
+    bool isTracking = docHTTPChannel->IsTrackingResource();
     if (isTracking) {
       // If our document channel is from a tracking resource, we must
       // override our channel's tracking status.
       nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(channel);
       MOZ_ASSERT(httpChannel,
                  "How come we're coming from an HTTP doc but "
                  "we don't have an HTTP channel here?");
       if (httpChannel) {
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -3491,17 +3491,17 @@ nsresult ScriptLoader::PrepareLoadedRequ
     }
 
     nsAutoCString sourceMapURL;
     if (nsContentUtils::GetSourceMapURL(httpChannel, sourceMapURL)) {
       aRequest->mHasSourceMapURL = true;
       aRequest->mSourceMapURL = NS_ConvertUTF8toUTF16(sourceMapURL);
     }
 
-    if (httpChannel->GetIsThirdPartyTrackingResource()) {
+    if (httpChannel->IsThirdPartyTrackingResource()) {
       aRequest->SetIsTracking();
     }
   }
 
   nsCOMPtr<nsIChannel> channel = do_QueryInterface(req);
   // If this load was subject to a CORS check, don't flag it with a separate
   // origin principal, so that it will treat our document's principal as the
   // origin principal.  Module loads always use CORS.
--- a/netwerk/cookie/CookieServiceChild.cpp
+++ b/netwerk/cookie/CookieServiceChild.cpp
@@ -150,17 +150,17 @@ void CookieServiceChild::TrackCookieLoad
   nsCOMPtr<nsIURI> uri;
   aChannel->GetURI(getter_AddRefs(uri));
   nsCOMPtr<nsILoadInfo> loadInfo = aChannel->LoadInfo();
   if (RequireThirdPartyCheck(loadInfo)) {
     mThirdPartyUtil->IsThirdPartyChannel(aChannel, uri, &isForeign);
   }
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aChannel);
   if (httpChannel) {
-    isTrackingResource = httpChannel->GetIsTrackingResource();
+    isTrackingResource = httpChannel->IsTrackingResource();
     // Check first-party storage access even for non-tracking resources, since
     // we will need the result when computing the access rights for the reject
     // foreign cookie behavior mode.
     uint32_t rejectedReason = 0;
     if (isForeign && AntiTrackingCommon::IsFirstPartyStorageAccessGrantedFor(
                          httpChannel, uri, &rejectedReason)) {
       firstPartyStorageAccessGranted = true;
     }
@@ -479,17 +479,17 @@ nsresult CookieServiceChild::GetCookieSt
   if (RequireThirdPartyCheck(loadInfo)) {
     mThirdPartyUtil->IsThirdPartyChannel(aChannel, aHostURI, &isForeign);
   }
 
   bool isTrackingResource = false;
   bool firstPartyStorageAccessGranted = false;
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aChannel);
   if (httpChannel) {
-    isTrackingResource = httpChannel->GetIsTrackingResource();
+    isTrackingResource = httpChannel->IsTrackingResource();
     // Check first-party storage access even for non-tracking resources, since
     // we will need the result when computing the access rights for the reject
     // foreign cookie behavior mode.
     if (isForeign && AntiTrackingCommon::IsFirstPartyStorageAccessGrantedFor(
                          httpChannel, aHostURI, nullptr)) {
       firstPartyStorageAccessGranted = true;
     }
   }
@@ -527,17 +527,17 @@ nsresult CookieServiceChild::SetCookieSt
   if (RequireThirdPartyCheck(loadInfo)) {
     mThirdPartyUtil->IsThirdPartyChannel(aChannel, aHostURI, &isForeign);
   }
 
   bool isTrackingResource = false;
   bool firstPartyStorageAccessGranted = false;
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aChannel);
   if (httpChannel) {
-    isTrackingResource = httpChannel->GetIsTrackingResource();
+    isTrackingResource = httpChannel->IsTrackingResource();
     // Check first-party storage access even for non-tracking resources, since
     // we will need the result when computing the access rights for the reject
     // foreign cookie behavior mode.
     if (isForeign && AntiTrackingCommon::IsFirstPartyStorageAccessGrantedFor(
                          httpChannel, aHostURI, nullptr)) {
       firstPartyStorageAccessGranted = true;
     }
   }
--- a/netwerk/cookie/CookieServiceParent.cpp
+++ b/netwerk/cookie/CookieServiceParent.cpp
@@ -131,17 +131,17 @@ void CookieServiceParent::TrackCookieLoa
   thirdPartyUtil = do_GetService(THIRDPARTYUTIL_CONTRACTID);
   bool isForeign = true;
   thirdPartyUtil->IsThirdPartyChannel(aChannel, uri, &isForeign);
 
   bool isTrackingResource = false;
   bool storageAccessGranted = false;
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aChannel);
   if (httpChannel) {
-    isTrackingResource = httpChannel->GetIsTrackingResource();
+    isTrackingResource = httpChannel->IsTrackingResource();
     // Check first-party storage access even for non-tracking resources, since
     // we will need the result when computing the access rights for the reject
     // foreign cookie behavior mode.
     if (isForeign && AntiTrackingCommon::IsFirstPartyStorageAccessGrantedFor(
                          httpChannel, uri, nullptr)) {
       storageAccessGranted = true;
     }
   }
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -1972,17 +1972,17 @@ nsresult nsCookieService::GetCookieStrin
   // Determine whether the request is foreign. Failure is acceptable.
   bool isForeign = true;
   mThirdPartyUtil->IsThirdPartyChannel(aChannel, aHostURI, &isForeign);
 
   bool isTrackingResource = false;
   bool firstPartyStorageAccessGranted = false;
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aChannel);
   if (httpChannel) {
-    isTrackingResource = httpChannel->GetIsTrackingResource();
+    isTrackingResource = httpChannel->IsTrackingResource();
 
     // Check first-party storage access even for non-tracking resources, since
     // we will need the result when computing the access rights for the reject
     // foreign cookie behavior mode.
     if (AntiTrackingCommon::IsFirstPartyStorageAccessGrantedFor(
             httpChannel, aHostURI, nullptr)) {
       firstPartyStorageAccessGranted = true;
     }
@@ -2091,17 +2091,17 @@ nsresult nsCookieService::SetCookieStrin
   // Determine whether the request is foreign. Failure is acceptable.
   bool isForeign = true;
   mThirdPartyUtil->IsThirdPartyChannel(aChannel, aHostURI, &isForeign);
 
   bool isTrackingResource = false;
   bool firstPartyStorageAccessGranted = false;
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aChannel);
   if (httpChannel) {
-    isTrackingResource = httpChannel->GetIsTrackingResource();
+    isTrackingResource = httpChannel->IsTrackingResource();
 
     // Check first-party storage access even for non-tracking resources, since
     // we will need the result when computing the access rights for the reject
     // foreign cookie behavior mode.
     if (AntiTrackingCommon::IsFirstPartyStorageAccessGrantedFor(
             httpChannel, aHostURI, nullptr)) {
       firstPartyStorageAccessGranted = true;
     }
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -1468,43 +1468,33 @@ NS_IMETHODIMP HttpBaseChannel::GetTopLev
   return NS_OK;
 }
 
 NS_IMETHODIMP HttpBaseChannel::SetTopLevelContentWindowId(uint64_t aWindowId) {
   mContentWindowId = aWindowId;
   return NS_OK;
 }
 
-bool
-HttpBaseChannel::IsTrackingResource() const {
+NS_IMETHODIMP
+HttpBaseChannel::IsTrackingResource(bool* aIsTrackingResource) {
   MOZ_ASSERT(!mFirstPartyClassificationFlags ||
              !mThirdPartyClassificationFlags);
-  return UrlClassifierCommon::IsTrackingClassificationFlag(
-             mThirdPartyClassificationFlags) ||
-         UrlClassifierCommon::IsTrackingClassificationFlag(
-             mFirstPartyClassificationFlags);
+  *aIsTrackingResource = UrlClassifierCommon::IsTrackingClassificationFlag(
+                             mThirdPartyClassificationFlags) ||
+                         UrlClassifierCommon::IsTrackingClassificationFlag(
+                             mFirstPartyClassificationFlags);
+  return NS_OK;
 }
 
 NS_IMETHODIMP
-HttpBaseChannel::GetIsTrackingResource(bool* aIsTrackingResource) {
-  *aIsTrackingResource = IsTrackingResource();
-  return NS_OK;
-}
-
-bool
-HttpBaseChannel::IsThirdPartyTrackingResource() const {
+HttpBaseChannel::IsThirdPartyTrackingResource(bool* aIsTrackingResource) {
   MOZ_ASSERT(
       !(mFirstPartyClassificationFlags && mThirdPartyClassificationFlags));
-  return UrlClassifierCommon::IsTrackingClassificationFlag(
+  *aIsTrackingResource = UrlClassifierCommon::IsTrackingClassificationFlag(
       mThirdPartyClassificationFlags);
-}
-
-NS_IMETHODIMP
-HttpBaseChannel::GetIsThirdPartyTrackingResource(bool* aIsTrackingResource) {
-  *aIsTrackingResource = IsThirdPartyTrackingResource();
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HttpBaseChannel::GetClassificationFlags(uint32_t* aFlags) {
   MOZ_ASSERT(!mFirstPartyClassificationFlags ||
              !mThirdPartyClassificationFlags);
   if (mThirdPartyClassificationFlags) {
--- a/netwerk/protocol/http/HttpBaseChannel.h
+++ b/netwerk/protocol/http/HttpBaseChannel.h
@@ -231,29 +231,30 @@ class HttpBaseChannel : public nsHashPro
   NS_IMETHOD SetIsMainDocumentChannel(bool aValue) override;
   NS_IMETHOD GetProtocolVersion(nsACString &aProtocolVersion) override;
   NS_IMETHOD GetChannelId(uint64_t *aChannelId) override;
   NS_IMETHOD SetChannelId(uint64_t aChannelId) override;
   NS_IMETHOD GetTopLevelContentWindowId(uint64_t *aContentWindowId) override;
   NS_IMETHOD SetTopLevelContentWindowId(uint64_t aContentWindowId) override;
   NS_IMETHOD GetTopLevelOuterContentWindowId(uint64_t *aWindowId) override;
   NS_IMETHOD SetTopLevelOuterContentWindowId(uint64_t aWindowId) override;
-  NS_IMETHOD GetIsTrackingResource(bool *aIsTrackingResource) override;
-  NS_IMETHOD GetIsThirdPartyTrackingResource(
-      bool *aIsTrackingResource) override;
+  NS_IMETHOD IsTrackingResource(bool *aIsTrackingResource) override;
+  NS_IMETHOD IsThirdPartyTrackingResource(bool *aIsTrackingResource) override;
   NS_IMETHOD GetClassificationFlags(uint32_t *aIsClassificationFlags) override;
   NS_IMETHOD GetFirstPartyClassificationFlags(
       uint32_t *aIsClassificationFlags) override;
   NS_IMETHOD GetThirdPartyClassificationFlags(
       uint32_t *aIsClassificationFlags) override;
   NS_IMETHOD OverrideTrackingFlagsForDocumentCookieAccessor(
       nsIHttpChannel *aDocumentChannel) override;
   NS_IMETHOD GetFlashPluginState(
       nsIHttpChannel::FlashPluginState *aState) override;
 
+  using nsIHttpChannel::IsThirdPartyTrackingResource;
+
   // nsIHttpChannelInternal
   NS_IMETHOD GetDocumentURI(nsIURI **aDocumentURI) override;
   NS_IMETHOD SetDocumentURI(nsIURI *aDocumentURI) override;
   NS_IMETHOD GetRequestVersion(uint32_t *major, uint32_t *minor) override;
   NS_IMETHOD GetResponseVersion(uint32_t *major, uint32_t *minor) override;
   NS_IMETHOD SetCookie(const char *aCookieHeader) override;
   NS_IMETHOD GetThirdPartyFlags(uint32_t *aForce) override;
   NS_IMETHOD SetThirdPartyFlags(uint32_t aForce) override;
@@ -533,19 +534,16 @@ class HttpBaseChannel : public nsHashPro
   static void CallTypeSniffers(void *aClosure, const uint8_t *aData,
                                uint32_t aCount);
 
   nsresult CheckRedirectLimit(uint32_t aRedirectFlags) const;
 
   bool MaybeWaitForUploadStreamLength(nsIStreamListener *aListener,
                                       nsISupports *aContext);
 
-  bool IsThirdPartyTrackingResource() const;
-  bool IsTrackingResource() const;
-
   friend class PrivateBrowsingChannel<HttpBaseChannel>;
   friend class InterceptFailedOnStop;
 
  protected:
   // this section is for main-thread-only object
   // all the references need to be proxy released on main thread.
   nsCOMPtr<nsIURI> mURI;
   nsCOMPtr<nsIURI> mOriginalURI;
--- a/netwerk/protocol/http/NullHttpChannel.cpp
+++ b/netwerk/protocol/http/NullHttpChannel.cpp
@@ -79,22 +79,22 @@ NullHttpChannel::GetTopLevelOuterContent
 }
 
 NS_IMETHODIMP
 NullHttpChannel::SetTopLevelOuterContentWindowId(uint64_t aWindowId) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
-NullHttpChannel::GetIsTrackingResource(bool *aIsTrackingResource) {
+NullHttpChannel::IsTrackingResource(bool *aIsTrackingResource) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
-NullHttpChannel::GetIsThirdPartyTrackingResource(bool *aIsTrackingResource) {
+NullHttpChannel::IsThirdPartyTrackingResource(bool *aIsTrackingResource) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 NullHttpChannel::GetClassificationFlags(uint32_t *aClassificationFlags) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
--- a/netwerk/protocol/http/nsIHttpChannel.idl
+++ b/netwerk/protocol/http/nsIHttpChannel.idl
@@ -555,29 +555,51 @@ interface nsIHttpChannel : nsIChannel
     /**
      * Returns true if the channel has loaded a resource that is classified as
      * tracker.
      * This is a helper attribute which returns the same value of
      * (classificationFlags & CLASSIFIED_ANY_TRACKING)
      *
      * Note that top-level channels could be marked as tracking
      * resource. In order to identify third-party tracking resources
-     * specifically, use isThirdPartyTrackingResource.
+     * specifically, use isThirdPartyTrackingResource().
      */
-    [infallible] readonly attribute boolean isTrackingResource;
+    boolean isTrackingResource();
+
+%{ C++
+  inline bool IsTrackingResource()
+  {
+    bool value = false;
+    if (NS_SUCCEEDED(IsTrackingResource(&value)) && value) {
+      return true;
+    }
+    return false;
+  }
+%}
 
     /**
      * Returns the classification flags if the channel has been processed by
      * URL-Classifier features and is considered third-party with the top
      * window URI.
      *
      * This is a helper attribute which returns the same value of
      * (thirdPartyClassificationFlags & CLASSIFIED_ANY_TRACKING)
      */
-    [infallible] readonly attribute boolean isThirdPartyTrackingResource;
+    boolean isThirdPartyTrackingResource();
+
+%{ C++
+  inline bool IsThirdPartyTrackingResource()
+  {
+    bool value = false;
+    if (NS_SUCCEEDED(IsThirdPartyTrackingResource(&value)) && value) {
+      return true;
+    }
+    return false;
+  }
+%}
 
     /**
      * Returns the allowing status for flash plugin for this channel.
      */
     cenum FlashPluginState : 8 {
       FlashPluginUnknown = 0,
       FlashPluginAllowed = 1,
       FlashPluginDenied = 2,
--- a/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
+++ b/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
@@ -699,28 +699,26 @@ nsViewSourceChannel::GetTopLevelOuterCon
 NS_IMETHODIMP
 nsViewSourceChannel::SetTopLevelOuterContentWindowId(uint64_t aWindowId) {
   return !mHttpChannel
              ? NS_ERROR_NULL_POINTER
              : mHttpChannel->SetTopLevelOuterContentWindowId(aWindowId);
 }
 
 NS_IMETHODIMP
-nsViewSourceChannel::GetIsTrackingResource(bool *aIsTrackingResource) {
-  return !mHttpChannel
-             ? NS_ERROR_NULL_POINTER
-             : mHttpChannel->GetIsTrackingResource(aIsTrackingResource);
+nsViewSourceChannel::IsTrackingResource(bool *aIsTrackingResource) {
+  return !mHttpChannel ? NS_ERROR_NULL_POINTER
+                       : mHttpChannel->IsTrackingResource(aIsTrackingResource);
 }
 
 NS_IMETHODIMP
-nsViewSourceChannel::GetIsThirdPartyTrackingResource(
-    bool *aIsTrackingResource) {
-  return !mHttpChannel ? NS_ERROR_NULL_POINTER
-                       : mHttpChannel->GetIsThirdPartyTrackingResource(
-                             aIsTrackingResource);
+nsViewSourceChannel::IsThirdPartyTrackingResource(bool *aIsTrackingResource) {
+  return !mHttpChannel
+             ? NS_ERROR_NULL_POINTER
+             : mHttpChannel->IsThirdPartyTrackingResource(aIsTrackingResource);
 }
 
 NS_IMETHODIMP
 nsViewSourceChannel::GetClassificationFlags(uint32_t *aClassificationFlags) {
   return !mHttpChannel
              ? NS_ERROR_NULL_POINTER
              : mHttpChannel->GetClassificationFlags(aClassificationFlags);
 }
--- a/netwerk/test/unit/test_trackingProtection_annotateChannels.js
+++ b/netwerk/test/unit/test_trackingProtection_annotateChannels.js
@@ -29,17 +29,17 @@ const defaultTopWindowURI = NetUtil.newU
 function listener(tracking, priority, throttleable, nextTest) {
   this._tracking = tracking;
   this._priority = priority;
   this._throttleable = throttleable;
   this._nextTest = nextTest;
 }
 listener.prototype = {
   onStartRequest: function(request) {
-    Assert.equal(request.QueryInterface(Ci.nsIHttpChannel).isTrackingResource,
+    Assert.equal(request.QueryInterface(Ci.nsIHttpChannel).isTrackingResource(),
                  this._tracking, "tracking flag");
     Assert.equal(request.QueryInterface(Ci.nsISupportsPriority).priority,
                  this._priority, "channel priority");
     if (runtime.processType == runtime.PROCESS_TYPE_DEFAULT && this._tracking) {
       Assert.equal(!!(request.QueryInterface(Ci.nsIClassOfService).classFlags &
                        Ci.nsIClassOfService.Throttleable),
                    this._throttleable, "throttleable flag");
     }
--- a/toolkit/components/antitracking/AntiTrackingCommon.cpp
+++ b/toolkit/components/antitracking/AntiTrackingCommon.cpp
@@ -1407,17 +1407,17 @@ bool AntiTrackingCommon::IsFirstPartySto
     LOG(("Nothing more to do due to the behavior code %d", int(behavior)));
     *aRejectedReason = nsIWebProgressListener::STATE_COOKIES_BLOCKED_FOREIGN;
     return false;
   }
 
   MOZ_ASSERT(behavior == nsICookieService::BEHAVIOR_REJECT_TRACKER);
 
   // Not a tracker.
-  if (!aChannel->GetIsThirdPartyTrackingResource()) {
+  if (!aChannel->IsThirdPartyTrackingResource()) {
     LOG(("Our channel isn't a third-party tracking channel"));
     return true;
   }
 
   nsIPrincipal* parentPrincipal = loadInfo->GetTopLevelStorageAreaPrincipal();
   if (!parentPrincipal) {
     LOG(("No top-level storage area principal at hand"));
 
--- a/toolkit/components/url-classifier/tests/mochitest/features.js
+++ b/toolkit/components/url-classifier/tests/mochitest/features.js
@@ -125,17 +125,17 @@ function runTests(flag, prefs, trackingR
       if (!channel ||
           !channel.URI.spec.startsWith("http://example.com/tests/toolkit/components/url-classifier/tests/mochitest/raptor.jpg")) {
         return;
       }
 
       // eslint-disable-next-line no-undef
       sendAsyncMessage("last-channel-flags", {
         classificationFlags: channel.classificationFlags,
-        isTrackingResource: channel.isTrackingResource,
+        isTrackingResource: channel.isTrackingResource(),
       });
     }
 
     // eslint-disable-next-line no-undef
     addMessageListener("done", __ => {
       Services.obs.removeObserver(onExamResp, "http-on-examine-response");
     });