[tbb-commits] [torbutton/master] Bug 11449: Avoid new identity error when NoScript disabled.
brade at torproject.org
brade at torproject.org
Thu Dec 11 22:14:09 UTC 2014
commit 88dfaaaf325f5b86aba3d449b87320d0d962681d
Author: Loic Bistuer <loic.bistuer at gmail.com>
Date: Tue Oct 21 02:30:20 2014 +0700
Bug 11449: Avoid new identity error when NoScript disabled.
---
src/chrome/content/torbutton.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index 2ba4159..5aed682 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -1646,8 +1646,10 @@ function torbutton_do_new_identity() {
torbutton_log(3, "New Identity: Clearing NoScript Temporary Permissions");
try {
- var nsSvc = Components.classes["@maone.net/noscript-service;1"].getService().wrappedJSObject
- nsSvc.eraseTemp();
+ if ("@maone.net/noscript-service;1" in Components.classes) {
+ var nsSvc = Components.classes["@maone.net/noscript-service;1"].getService().wrappedJSObject
+ nsSvc.eraseTemp();
+ }
} catch(e) {
torbutton_log(5, "New Identity: Error clearing NoScript Temporary Permissions: "+e);
window.alert("Torbutton: Error clearing NoScript Temporary Permissions: "+e);
More information about the tbb-commits
mailing list