Bug 1265836 - Part 5: Change ext-downloads.js to expect a date rather than a number from normalizeTime, r?aswan
MozReview-Commit-ID: 4qyG9WJ8lyl
--- 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) {