Bug 1493563 - Part 6: Only restrict notifying same loading URI channels to tracking protection notifications; r=baku
☠☠ backed out by 1681bd622c63 ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Sun, 23 Sep 2018 00:11:47 -0400
changeset 494517 ce0211be57a17fc1568f7b668d612a142014ff39
parent 494516 83d6c2bf8dc6cd3b33ce25c5ac54fab8a391cf30
child 494518 bb2720a401fed1848e792b202d744171a60af7d5
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1493563
milestone64.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 1493563 - Part 6: Only restrict notifying same loading URI channels to tracking protection notifications; r=baku This check was originally added for tracking protection, and we need to keep the state of the document updated for the rest of our blocking states even for third-party channels. Differential Revision: https://phabricator.services.mozilla.com/D6596
dom/base/nsGlobalWindowOuter.cpp
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -5290,17 +5290,18 @@ nsGlobalWindowOuter::NotifyContentBlocki
   }
   nsCOMPtr<nsIDocument> doc = docShell->GetDocument();
   NS_ENSURE_TRUE_VOID(doc);
 
   // This event might come after the user has navigated to another page.
   // To prevent showing the TrackingProtection UI on the wrong page, we need to
   // check that the loading URI for the channel is the same as the URI currently
   // loaded in the document.
-  if (!SameLoadingURI(doc, aChannel)) {
+  if (!SameLoadingURI(doc, aChannel) &&
+      aState == nsIWebProgressListener::STATE_BLOCKED_TRACKING_CONTENT) {
     return;
   }
 
   // Notify nsIWebProgressListeners of this security event.
   // Can be used to change the UI state.
   nsresult rv = NS_OK;
   nsCOMPtr<nsISecurityEventSink> eventSink = do_QueryInterface(docShell, &rv);
   NS_ENSURE_SUCCESS_VOID(rv);