Bug 1448869 Set Timer Precision to 100 us (with Jitter) r?baku draft
authorTom Ritter <tom@mozilla.com>
Mon, 26 Mar 2018 11:41:59 -0500
changeset 772653 38830e58629d9af06fededee8a71b6325d28db84
parent 772574 7b9da7139d94951431a148dcaf8a388640c91b27
child 772654 90fa4a2d6c85de8d773f231875c5419c52160153
push id104013
push userbmo:tom@mozilla.com
push dateMon, 26 Mar 2018 19:17:41 +0000
reviewersbaku
bugs1448869
milestone61.0a1
Bug 1448869 Set Timer Precision to 100 us (with Jitter) r?baku MozReview-Commit-ID: HV1rG4Kzg9k
modules/libpref/init/all.js
toolkit/components/resistfingerprinting/nsRFPService.cpp
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1431,17 +1431,17 @@ pref("privacy.resistFingerprinting", fal
 // If you do set it, to work around some broken website, please file a bug with
 // information so we can understand why it is needed.
 pref("privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts", true);
 // A subset of Resist Fingerprinting protections focused specifically on timers for testing
 // This affects the Animation API, the performance APIs, Date.getTime, Event.timestamp,
 //   File.lastModified, audioContext.currentTime, canvas.captureStream.currentTime
 pref("privacy.reduceTimerPrecision", true);
 // Dynamically tune the resolution of the timer reduction for both of the two above prefs
-pref("privacy.resistFingerprinting.reduceTimerPrecision.microseconds", 2000);
+pref("privacy.resistFingerprinting.reduceTimerPrecision.microseconds", 100);
 // Enable jittering the clock one precision value forward
 pref("privacy.resistFingerprinting.reduceTimerPrecision.jitter", true);
 // Lower the priority of network loads for resources on the tracking protection list.
 // Note that this requires the privacy.trackingprotection.annotate_channels pref to be on in order to have any effect.
 #ifdef NIGHTLY_BUILD
 pref("privacy.trackingprotection.lower_network_priority", true);
 #else
 pref("privacy.trackingprotection.lower_network_priority", false);
--- a/toolkit/components/resistfingerprinting/nsRFPService.cpp
+++ b/toolkit/components/resistfingerprinting/nsRFPService.cpp
@@ -42,17 +42,17 @@
 using namespace mozilla;
 using namespace std;
 
 static mozilla::LazyLogModule gResistFingerprintingLog("nsResistFingerprinting");
 
 #define RESIST_FINGERPRINTING_PREF "privacy.resistFingerprinting"
 #define RFP_TIMER_PREF "privacy.reduceTimerPrecision"
 #define RFP_TIMER_VALUE_PREF "privacy.resistFingerprinting.reduceTimerPrecision.microseconds"
-#define RFP_TIMER_VALUE_DEFAULT 2000
+#define RFP_TIMER_VALUE_DEFAULT 100
 #define RFP_JITTER_VALUE_PREF "privacy.resistFingerprinting.reduceTimerPrecision.jitter"
 #define RFP_JITTER_VALUE_DEFAULT true
 #define RFP_SPOOFED_FRAMES_PER_SEC_PREF "privacy.resistFingerprinting.video_frames_per_sec"
 #define RFP_SPOOFED_DROPPED_RATIO_PREF  "privacy.resistFingerprinting.video_dropped_ratio"
 #define RFP_TARGET_VIDEO_RES_PREF "privacy.resistFingerprinting.target_video_res"
 #define RFP_SPOOFED_FRAMES_PER_SEC_DEFAULT 30
 #define RFP_SPOOFED_DROPPED_RATIO_DEFAULT  5
 #define RFP_TARGET_VIDEO_RES_DEFAULT 480