[or-cvs] r15827: Wrap cookie clearing in try block just in case. (torbutton/trunk/src/components)

mikeperry at seul.org mikeperry at seul.org
Fri Jul 11 07:16:02 UTC 2008


Author: mikeperry
Date: 2008-07-11 03:16:01 -0400 (Fri, 11 Jul 2008)
New Revision: 15827

Modified:
   torbutton/trunk/src/components/cookie-jar-selector.js
Log:

Wrap cookie clearing in try block just in case.



Modified: torbutton/trunk/src/components/cookie-jar-selector.js
===================================================================
--- torbutton/trunk/src/components/cookie-jar-selector.js	2008-07-11 04:27:56 UTC (rev 15826)
+++ torbutton/trunk/src/components/cookie-jar-selector.js	2008-07-11 07:16:01 UTC (rev 15827)
@@ -69,9 +69,13 @@
   };
 
   this.clearCookies = function() {
-    Cc["@mozilla.org/cookiemanager;1"]
-    .getService(Ci.nsICookieManager)
-    .removeAll();
+    try {
+        Cc["@mozilla.org/cookiemanager;1"]
+            .getService(Ci.nsICookieManager)
+            .removeAll();
+    } catch(e) {
+        this.logger.log(4, "Cookie clearing exception: "+e);
+    }
   }
 
   // json would be a fine alternative to e4x, but is only available from



More information about the tor-commits mailing list