Bug 1293618 - Replace history deleteAllPages with clear. Suite part. r=IanN a=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Sat, 13 Aug 2016 03:17:27 +0200
changeset 27263 54e477a16b9fbec302bbea50b3026f8f6979dccb
parent 27262 e8030ba9c303a113807005927d421d847dbb7835
child 27264 b5dd8faf93dfdecd40861e7dfe83631468ac9e4d
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) {}
       },