Bug 311169 - typo in sanitize.js pref call (nsIBranch instead of nsIPrefBranch from bug 284086). r=mconnnor
authorrob_strong@exchangecode.com
Tue, 02 Oct 2007 20:35:26 -0700
changeset 6576 03888e33258256e917ed8e2e28aae25b3cc91814
parent 6575 fbe539243c07fb3442721f03a14e76af59a26b38
child 6577 e0a9035a419cd258d09c305dce1317f80df2eb07
push idunknown
push userunknown
push dateunknown
reviewersmconnnor
bugs311169, 284086
milestone1.9a9pre
Bug 311169 - typo in sanitize.js pref call (nsIBranch instead of nsIPrefBranch from bug 284086). r=mconnnor
browser/modules/Sanitizer.jsm
--- a/browser/modules/Sanitizer.jsm
+++ b/browser/modules/Sanitizer.jsm
@@ -105,17 +105,17 @@ Sanitizer.prototype = {
         // and we fall back to the "nice" way below)
         
         var cacheDir;
         // Look at nsCacheProfilePrefObserver::ReadPrefs()
         // and nsDiskCacheDevice::SetCacheParentDirectory()
         // for details on how we guess the cache directory
         try {
           cacheDir = cc["@mozilla.org/preferences-service;1"]
-                       .getService(ci.nsIBranch)
+                       .getService(ci.nsIPrefBranch)
                        .getComplexValue("browser.cache.disk.parent_directory",
                                         ci.nsILocalFile);
         } catch(er) {
           const dirServ = cc["@mozilla.org/file/directory_service;1"]
                             .getService(ci.nsIProperties);
           try {
             cacheDir = dirServ.get("cachePDir",ci.nsILocalFile);
           } catch(er) {
@@ -132,18 +132,20 @@ Sanitizer.prototype = {
           } catch(er) {}
           cacheDir = cacheDir.parent;
           cacheDir.append("Cache");
           try {
            cacheDir.remove(true);
           } catch(er) {}
         }
         
-        // The "nice" way
-        cacheService.evictEntries(ci.nsICache.STORE_ANYWHERE);
+        try {
+          // The "nice" way
+          cacheService.evictEntries(ci.nsICache.STORE_ANYWHERE);
+        } catch(er) {}
         
       },
       
       get canClear()
       {
         return true;
       }
     },