Bug 1265836 - Part 5: Change ext-downloads.js to expect a date rather than a number from normalizeTime, r?aswan draft
authorBob Silverberg <bsilverberg@mozilla.com>
Wed, 18 May 2016 14:14:56 -0400
changeset 368459 610408ebc53048102d556049fde1625fea900a96
parent 368458 ba48a1e012bcfc28c35bababb7ca966eced59f66
child 521278 2c66fffeb041560d8f932e4c7030d5835d5358f1
push id18540
push userbmo:bob.silverberg@gmail.com
push dateWed, 18 May 2016 19:15:37 +0000
reviewersaswan
bugs1265836
milestone49.0a1
Bug 1265836 - Part 5: Change ext-downloads.js to expect a date rather than a number from normalizeTime, r?aswan MozReview-Commit-ID: 4qyG9WJ8lyl
toolkit/components/extensions/ext-downloads.js
--- a/toolkit/components/extensions/ext-downloads.js
+++ b/toolkit/components/extensions/ext-downloads.js
@@ -245,20 +245,20 @@ function downloadQuery(query) {
   function normalizeDownloadTime(arg, before) {
     if (arg == null) {
       return before ? Number.MAX_VALUE : 0;
     } else {
       return normalizeTime(arg);
     }
   }
 
-  const startedBefore = normalizeDownloadTime(query.startedBefore, true);
-  const startedAfter = normalizeDownloadTime(query.startedAfter, false);
-  // const endedBefore = normalizeDownloadTime(query.endedBefore, true);
-  // const endedAfter = normalizeDownloadTime(query.endedAfter, false);
+  const startedBefore = normalizeDownloadTime(query.startedBefore, true).valueOf();
+  const startedAfter = normalizeDownloadTime(query.startedAfter, false).valueOf();
+  // const endedBefore = normalizeDownloadTime(query.endedBefore, true).valueOf();
+  // const endedAfter = normalizeDownloadTime(query.endedAfter, false).valueOf();
 
   const totalBytesGreater = query.totalBytesGreater || 0;
   const totalBytesLess = (query.totalBytesLess != null)
         ? query.totalBytesLess : Number.MAX_VALUE;
 
   // Handle options for which we can have a regular expression and/or
   // an explicit value to match.
   function makeMatch(regex, value, field) {