Bug 1526304 - Port bug 1089691: Use PlacesUtils.history.removeVisitsByFilter() when clearing history. r=jorgk
authorBenjamin Flanagin <benjamin@thunderbird.net>
Fri, 31 May 2019 17:08:06 +0200
changeset 35733 6e8451e1c4f9c089dd03bb852fb98a7f5c0a83c5
parent 35732 5f693c07b58e34cc087fc2500f38d46fa88e46d9
child 35734 264313145933c772a970ab5f4efb71787d623391
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersjorgk
bugs1526304, 1089691
Bug 1526304 - Port bug 1089691: Use PlacesUtils.history.removeVisitsByFilter() when clearing history. r=jorgk
mail/base/content/sanitize.js
--- a/mail/base/content/sanitize.js
+++ b/mail/base/content/sanitize.js
@@ -143,17 +143,20 @@ Sanitizer.prototype = {
       get canClear() {
         return true;
       },
     },
 
     history: {
       clear() {
         if (this.range)
-          PlacesUtils.history.removeVisitsByTimeframe(this.range[0], this.range[1]);
+          PlacesUtils.history.removeVisitsByFilter({
+            beginDate: new Date(this.range[0]),
+            endDate: new Date(this.range[1]),
+          });
         else
           PlacesUtils.history.clear();
 
         try {
           Services.obs.notifyObservers(null, "browser:purge-session-history");
         } catch (e) {}
 
         try {