Bug 1293618 - Replace history deleteAllPages with clear. Suite part. r=IanN a=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Sat, 13 Aug 2016 03:14:35 +0200
changeset 27435 fbf98313aacc6d1cb8256632aff1e2164499dd4a
parent 27434 ff2d2bcd9f73df5c40212fc9d1fd4308eccd5939
child 27436 1f14263d85cf2c5d80c9b0e612490cdc4ec87904
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, IanN
bugs1293618
Bug 1293618 - Replace history deleteAllPages with clear. Suite part. r=IanN a=IanN
suite/common/pref/pref-history.js
suite/modules/Sanitizer.jsm
--- a/suite/common/pref/pref-history.js
+++ b/suite/common/pref/pref-history.js
@@ -30,17 +30,17 @@ function Startup()
                                 .getService(Components.interfaces.nsINavHistoryService);
   if (!globalHistory.hasHistoryEntries)
     globalHistButton.disabled = true;
 }
 
 function prefClearGlobalHistory()
 {
   Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
-  PlacesUtils.history.removeAllPages();
+  PlacesUtils.history.clear();
 }
 
 function prefClearUrlbarHistory(aButton)
 {
   document.getElementById("general.open_location.last_url").valueFromPreferences = "";
   var file = GetUrlbarHistoryFile();
   if (file.exists())
     file.remove(false);
--- a/suite/modules/Sanitizer.jsm
+++ b/suite/modules/Sanitizer.jsm
@@ -168,17 +168,17 @@ var Sanitizer = {
     },
 
     history: {
       clear: function() {
         Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
 
         // use try/catch for everything but the last task so we clear as much as possible
         try {
-          PlacesUtils.history.removeAllPages();
+          PlacesUtils.history.clear();
         } catch(ex) {}
 
         try {
           var os = Components.classes["@mozilla.org/observer-service;1"]
                              .getService(Components.interfaces.nsIObserverService);
           os.notifyObservers(null, "browser:purge-session-history", "");
         } catch(ex) {}
       },