Backed out changeset 5f0139ba2544 (bug 1545273) for browser_blockingCookies.js failures CLOSED TREE
authorBogdan Tara <btara@mozilla.com>
Mon, 22 Apr 2019 23:29:22 +0300
changeset 470406 b48ddc1c59ba06cb99c1eed21ab4edf1ffd5686f
parent 470405 8cef878e7aa68b2c51b045af829bcda00d868dfa
child 470407 24161afba7afa66dd487203298e568610bfe1191
push id35905
push userdvarga@mozilla.com
push dateTue, 23 Apr 2019 09:53:27 +0000
treeherdermozilla-central@831918f009f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1545273
milestone68.0a1
backs out5f0139ba25448132c646dfc706866998419af77f
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
Backed out changeset 5f0139ba2544 (bug 1545273) for browser_blockingCookies.js failures CLOSED TREE
toolkit/components/antitracking/AntiTrackingCommon.cpp
--- a/toolkit/components/antitracking/AntiTrackingCommon.cpp
+++ b/toolkit/components/antitracking/AntiTrackingCommon.cpp
@@ -855,20 +855,20 @@ AntiTrackingCommon::AddFirstPartyStorage
   // parent, without having received the permission itself yet.
   //
   // We define this as an enum, since without that MSVC fails to capturing this
   // name inside the lambda without the explicit capture and clang warns if
   // there is an explicit capture with -Wunused-lambda-capture.
   enum : uint32_t {
     blockReason = nsIWebProgressListener::STATE_COOKIES_BLOCKED_TRACKER
   };
-  if (aReason != eOpenerAfterUserInteraction &&
-      nsContentUtils::IsURIInPrefList(trackingURI,
-                                      "privacy.restrict3rdpartystorage."
-                                      "userInteractionRequiredForHosts") &&
+  if ((aReason != eOpenerAfterUserInteraction ||
+       nsContentUtils::IsURIInPrefList(trackingURI,
+                                       "privacy.restrict3rdpartystorage."
+                                       "userInteractionRequiredForHosts")) &&
       !HasUserInteraction(trackingPrincipal)) {
     LOG_SPEC(("Tracking principal (%s) hasn't been interacted with before, "
               "refusing to add a first-party storage permission to access it",
               _spec),
              trackingURI);
     NotifyBlockingDecision(aParentWindow, BlockingDecision::eBlock,
                            blockReason);
     return StorageAccessGrantPromise::CreateAndReject(false, __func__);