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

[tor-commits] [torbutton/master] Bug 20347.1: Apply torbutton security_slider pref at startup



commit 595b01456eaa3b0759f1f80d562ebf6520c8c182
Author: Arthur Edelstein <arthuredelstein@xxxxxxxxx>
Date:   Tue Nov 8 07:57:10 2016 -0800

    Bug 20347.1: Apply torbutton security_slider pref at startup
    
    Fixes bug in the main 20347 patch, reported at
    https://trac.torproject.org/projects/tor/ticket/20347#comment:13
---
 src/modules/security-prefs.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/security-prefs.js b/src/modules/security-prefs.js
index 3710862..fa30aba 100644
--- a/src/modules/security-prefs.js
+++ b/src/modules/security-prefs.js
@@ -78,7 +78,7 @@ var watch_security_prefs = function (onSettingChanged) {
   let prefNames = Object.keys(kSecuritySettings);
   let unbindFuncs = [];
   for (let prefName of prefNames) {
-    unbindFuncs.push(bindPref(
+    unbindFuncs.push(bindPrefAndInit(
       prefName, () => onSettingChanged(read_setting_from_prefs())));
   }
   // Call all the unbind functions.
@@ -102,7 +102,7 @@ var initialize = function () {
   initialized = true;
   // When security_custom is set to false, apply security_slider setting
   // to the security-sensitive prefs.
-  bindPref(kCustomPref, function (custom) {
+  bindPrefAndInit(kCustomPref, function (custom) {
     if (custom === false) {
       write_setting_to_prefs(getIntPref(kSliderPref));
     }

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