Bug 1469518 - Ensure history sanitization for "today" reaches all the way back to exactly midnight. r=mak
authorJonathan Kew <jkew@mozilla.com>
Wed, 20 Jun 2018 12:34:02 +0100
changeset 423151 8644e415f6ba781c97fdd43dc11f29f27a823132
parent 423150 b84a55905d0e1c6bc6d863878d1e81243e0500fa
child 423152 ef348f3f604cf27dcc7a8575eea682db1a9e8809
push id34164
push usercsabou@mozilla.com
push dateThu, 21 Jun 2018 01:17:13 +0000
treeherdermozilla-central@d231a3231680 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1469518
milestone62.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 1469518 - Ensure history sanitization for "today" reaches all the way back to exactly midnight. r=mak
browser/modules/Sanitizer.jsm
--- a/browser/modules/Sanitizer.jsm
+++ b/browser/modules/Sanitizer.jsm
@@ -201,16 +201,17 @@ var Sanitizer = {
       case Sanitizer.TIMESPAN_4HOURS :
         startDate = endDate - 14400000000; // 4*60*60*1000000
         break;
       case Sanitizer.TIMESPAN_TODAY :
         var d = new Date(); // Start with today
         d.setHours(0); // zero us back to midnight...
         d.setMinutes(0);
         d.setSeconds(0);
+        d.setMilliseconds(0);
         startDate = d.valueOf() * 1000; // convert to epoch usec
         break;
       case Sanitizer.TIMESPAN_24HOURS :
         startDate = endDate - 86400000000; // 24*60*60*1000000
         break;
       default:
         throw "Invalid time span for clear private data: " + ts;
     }