[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torbutton/master] Bug 11449: Avoid new identity error when NoScript disabled.



commit 88dfaaaf325f5b86aba3d449b87320d0d962681d
Author: Loic Bistuer <loic.bistuer@xxxxxxxxx>
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);

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits