Bug 567121 - Clear autocomplete cache instantly when session history is purged [r=mfinkle]
authorWes Johnston <wjohnston@mozilla.com>
Tue, 29 Mar 2011 16:41:07 -0700
changeset 2948 6b9a963ef50592fc6c0cd7e85c29a778fa32f836
parent 2947 650faad3682ff9397717fa3783c2d254a9420851
child 2949 d853ebaf4533eeb4408edd678081229894f9def1
push id2485
push userwjohnston@mozilla.com
push dateTue, 29 Mar 2011 23:41:39 +0000
reviewersmfinkle
bugs567121
Bug 567121 - Clear autocomplete cache instantly when session history is purged [r=mfinkle]
components/AutoCompleteCache.js
--- a/components/AutoCompleteCache.js
+++ b/components/AutoCompleteCache.js
@@ -339,17 +339,17 @@ AutoCompleteCache.prototype = {
     switch (aTopic) {
       case "browser:cache-session-history-reload":
         if (AutoCompleteUtils.cacheFile.exists())
           AutoCompleteUtils.loadCache();
         else
           AutoCompleteUtils.fetch(AutoCompleteUtils.query);
         break;
       case "browser:purge-session-history":
-        AutoCompleteUtils.update();
+        AutoCompleteUtils.fetch(AutoCompleteUtils.query);
         break;
       case "browser-search-engine-modified":
         this.searchEngines = Services.search.getVisibleEngines();
         break;
     }
   }
 };