Bug 1628743 - Enable cookie purging by default in Nightly, clean up logging prefs. r=ewright
authorJohann Hofmann <jhofmann@mozilla.com>
Wed, 15 Apr 2020 14:22:14 +0000
changeset 524157 6606d18394f3a5476f0abdacbb7a8a7a8b69b3b8
parent 524156 cc092011bfe60d3fd8e39659000a0135b464509c
child 524158 346767fe3f9027d50222a07a981d8eb3b573fea5
push id37316
push usernerli@mozilla.com
push dateWed, 15 Apr 2020 21:51:03 +0000
treeherdermozilla-central@afa247928245 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersewright
bugs1628743
milestone77.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 1628743 - Enable cookie purging by default in Nightly, clean up logging prefs. r=ewright Differential Revision: https://phabricator.services.mozilla.com/D70940
modules/libpref/init/all.js
toolkit/components/antitracking/PurgeTrackerService.jsm
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1073,28 +1073,27 @@ pref("privacy.restrict3rdpartystorage.ur
 // Excessive reporting of blocked popups can be a DOS vector,
 // by overloading the main process as popups get blocked and when
 // users try to restore all popups, which is the most visible
 // option in our UI at the time of writing.
 // We will invisibly drop any popups from a page that has already
 // opened more than this number of popups.
 pref("privacy.popups.maxReported", 100);
 
-// Enable Purge Tracking Cookie Jars feature.
-pref("privacy.purge_trackers.enabled", false);
-// Enable logging for Purge Tracking Cookie Jars feature.
+// Purging first-party tracking cookies.
 #ifdef NIGHTLY_BUILD
-  pref("privacy.purge_trackers.logging.enabled", true);
+  pref("privacy.purge_trackers.enabled", true);
+  pref("privacy.purge_trackers.logging.level", "All");
 #else
-  pref("privacy.purge_trackers.logging.enabled", false);
+  pref("privacy.purge_trackers.enabled", false);
+  pref("privacy.purge_trackers.logging.level", "Error");
 #endif
+
 // Allowable amount of cookies to purge in a batch.
 pref("privacy.purge_trackers.max_purge_count", 100);
-pref("privacy.purge_trackers.logging.level", "Warn");
-
 
 pref("dom.event.contextmenu.enabled",       true);
 pref("dom.event.coalesce_mouse_move",       true);
 
 pref("javascript.enabled",                  true);
 pref("javascript.options.blinterp",         true);
 // Duplicated in JitOptions - ensure both match.
 pref("javascript.options.blinterp.threshold", 10);
--- a/toolkit/components/antitracking/PurgeTrackerService.jsm
+++ b/toolkit/components/antitracking/PurgeTrackerService.jsm
@@ -13,23 +13,16 @@ const { Services } = ChromeUtils.import(
 
 XPCOMUtils.defineLazyServiceGetter(
   this,
   "gClassifier",
   "@mozilla.org/url-classifier/dbservice;1",
   "nsIURIClassifier"
 );
 
-XPCOMUtils.defineLazyPreferenceGetter(
-  this,
-  "loggingEnabled",
-  "privacy.purge_trackers.logging.enabled",
-  false
-);
-
 this.PurgeTrackerService = function() {};
 
 PurgeTrackerService.prototype = {
   classID: Components.ID("{90d1fd17-2018-4e16-b73c-a04a26fa6dd4}"),
   QueryInterface: ChromeUtils.generateQI([Ci.nsIPurgeTrackerService]),
 
   // We can only know asynchronously if a host is matched by the tracking
   // protection list, so we cache the result for faster future lookups.
@@ -268,18 +261,16 @@ PurgeTrackerService.prototype = {
 
 /**
  * Outputs the message to the JavaScript console as well as to stdout.
  *
  * @param {...string} args The message to output.
  */
 var logConsole;
 function LOG(...args) {
-  if (loggingEnabled) {
-    if (!logConsole) {
-      logConsole = console.createInstance({
-        prefix: "*** PurgeTrackerService:",
-        maxLogLevelPref: "privacy.purge_trackers.logging.level",
-      });
-    }
-    logConsole.log(...args);
+  if (!logConsole) {
+    logConsole = console.createInstance({
+      prefix: "*** PurgeTrackerService:",
+      maxLogLevelPref: "privacy.purge_trackers.logging.level",
+    });
   }
+  logConsole.log(...args);
 }