Bug 1547813 - Part 6: Return StorageAccess::ePartitionForeignOrDeny from storage access APIs when the antitracking backend mandates that; r=baku
☠☠ backed out by 8fea66166287 ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 08 May 2019 20:13:23 +0000
changeset 532059 06943593738cbfb00527317c54f8b58d324060ab
parent 532058 4ced8d49ddc37cd3ecdb62c38e7df51f5603f475
child 532060 807ce59e7e6eecbbb83b02d1ff45ecbda9896835
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)
reviewersbaku
bugs1547813
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 1547813 - Part 6: Return StorageAccess::ePartitionForeignOrDeny from storage access APIs when the antitracking backend mandates that; r=baku Differential Revision: https://phabricator.services.mozilla.com/D29741
dom/base/nsContentUtils.cpp
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -8468,16 +8468,22 @@ nsContentUtils::StorageAccess nsContentU
   }
 
   // We want to have a partitioned storage only for trackers.
   if (aRejectedReason ==
       nsIWebProgressListener::STATE_COOKIES_BLOCKED_TRACKER) {
     return StorageAccess::ePartitionTrackersOrDeny;
   }
 
+  // We want to have a partitioned storage for all third parties.
+  if (aRejectedReason ==
+      nsIWebProgressListener::STATE_COOKIES_PARTITIONED_FOREIGN) {
+    return StorageAccess::ePartitionForeignOrDeny;
+  }
+
   return StorageAccess::eDeny;
 }
 
 namespace {
 
 // We put StringBuilder in the anonymous namespace to prevent anything outside
 // this file from accidentally being linked against it.
 class BulkAppender {