[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torbutton/master] Allow New Identity to continue if there's an image cache exception.
commit 917f1ecdb134cb5e036f3373069a724938c6e6ae
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date: Sat Feb 9 16:03:03 2013 -0800
Allow New Identity to continue if there's an image cache exception.
---
src/chrome/content/torbutton.js | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index 0475bc8..82b9150 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -1234,9 +1234,14 @@ function torbutton_do_new_identity() {
m_tb_prefs.setIntPref("browser.sessionstore.max_tabs_undo", 0);
m_tb_prefs.setIntPref("browser.sessionstore.max_tabs_undo", tabs);
- var imgCache = Components.classes["@mozilla.org/image/cache;1"].
+ try {
+ var imgCache = Components.classes["@mozilla.org/image/cache;1"].
getService(Components.interfaces.imgICache);
- imgCache.clearCache(false); // evict all but chrome cache
+ imgCache.clearCache(false); // evict all but chrome cache
+ } catch(e) {
+ torbutton_log(5, "Exception on image cache clearing: "+e);
+ window.alert("Torbutton: Unexpected error during image cache clearing: "+e);
+ }
var cache = Components.classes["@mozilla.org/network/cache-service;1"].
getService(Components.interfaces.nsICacheService);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits