[tor-commits] [torbutton/master] Bug 18466: Make Torbutton compatible with ESR45

gk at torproject.org gk at torproject.org
Fri Apr 8 12:49:20 UTC 2016


commit e4f7079dd5d4ae44b8d10b48889d165eba20a660
Author: Georg Koppen <gk at torproject.org>
Date:   Thu Apr 7 09:51:05 2016 +0000

    Bug 18466: Make Torbutton compatible with ESR45
    
    Our usage of |let| does not work anymore since changes in Firefox 44
    landed. See: https://bugzilla.mozilla.org/show_bug.cgi?id=589199.
---
 src/components/domain-isolator.js | 6 +++---
 src/modules/tor-control-port.js   | 2 +-
 src/modules/utils.js              | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/components/domain-isolator.js b/src/components/domain-isolator.js
index 2639322..6cfd21e 100644
--- a/src/components/domain-isolator.js
+++ b/src/components/domain-isolator.js
@@ -30,7 +30,7 @@ mozilla.protocolProxyService = Cc["@mozilla.org/network/protocol-proxy-service;1
 // Mozilla's Thirdy Party Utilities, for figuring out first party domain.
 mozilla.thirdPartyUtil = Cc["@mozilla.org/thirdpartyutil;1"]
                            .getService(Ci.mozIThirdPartyUtil);
-                           
+
 // __mozilla.registerProxyChannelFilter(filterFunction, positionIndex)__.
 // Registers a proxy channel filter with the Mozilla Protocol Proxy Service,
 // which will help to decide the proxy to be used for a given channel.
@@ -63,7 +63,7 @@ tor.unknownDirtySince = Date.now();
 
 // __tor.socksProxyCredentials(originalProxy, domain)__.
 // Takes a proxyInfo object (originalProxy) and returns a new proxyInfo
-// object with the same properties, except the username is set to the 
+// object with the same properties, except the username is set to the
 // the domain, and the password is a nonce.
 tor.socksProxyCredentials = function (originalProxy, domain) {
   // Check if we already have a nonce. If not, create
@@ -113,7 +113,7 @@ tor.isolateCircuitsByDomain = function () {
           proxy = aProxy.QueryInterface(Ci.nsIProxyInfo),
           replacementProxy = tor.socksProxyCredentials(aProxy, firstPartyDomain);
       logger.eclog(3, "tor SOCKS: " + channel.URI.spec + " via " +
-                      replacementProxy.username + ":" + replacementProxy.password); 
+                      replacementProxy.username + ":" + replacementProxy.password);
       return replacementProxy;
     } catch (err) {
       logger.eclog(3, err.message);
diff --git a/src/modules/tor-control-port.js b/src/modules/tor-control-port.js
index 1cef898..63c2cd9 100644
--- a/src/modules/tor-control-port.js
+++ b/src/modules/tor-control-port.js
@@ -641,7 +641,7 @@ tor.controller = function (host, port, password, onError) {
 //     let replyPromise = c.getInfo("ip-to-country/16.16.16.16");
 //     // Close the controller permanently
 //     c.close();
-let controller = function (host, port, password, onError) {
+var controller = function (host, port, password, onError) {
   let dest = host + ":" + port,
       maybeController = tor.controllerCache[dest];
   return (tor.controllerCache[dest] =
diff --git a/src/modules/utils.js b/src/modules/utils.js
index de3cca6..eb0746b 100644
--- a/src/modules/utils.js
+++ b/src/modules/utils.js
@@ -14,7 +14,7 @@ let prefs = Services.prefs;
 
 // __getPrefValue(prefName)__
 // Returns the current value of a preference, regardless of its type.
-let getPrefValue = function (prefName) {
+var getPrefValue = function (prefName) {
   switch(prefs.getPrefType(prefName)) {
     case prefs.PREF_BOOL: return prefs.getBoolPref(prefName);
     case prefs.PREF_INT: return prefs.getIntPref(prefName);
@@ -27,7 +27,7 @@ let getPrefValue = function (prefName) {
 // Applies prefHandler to the current value of pref specified by prefName.
 // Re-applies prefHandler whenever the value of the pref changes.
 // Returns a zero-arg function that unbinds the pref.
-let bindPrefAndInit = function (prefName, prefHandler) {
+var bindPrefAndInit = function (prefName, prefHandler) {
   let update = () => { prefHandler(getPrefValue(prefName)); },
       observer = { observe : function (subject, topic, data) {
                      if (data === prefName) {
@@ -48,7 +48,7 @@ let env = Components.classes["@mozilla.org/process/environment;1"]
 
 // __getEnv(name)__.
 // Reads the environment variable of the given name.
-let getEnv = function (name) {
+var getEnv = function (name) {
   return env.exists(name) ? env.get(name) : undefined;
 };
 



More information about the tor-commits mailing list