Commit 595b0145 authored by Arthur Edelstein's avatar Arthur Edelstein Committed by Georg Koppen
Browse files

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
parent e59f6df8
...@@ -78,7 +78,7 @@ var watch_security_prefs = function (onSettingChanged) { ...@@ -78,7 +78,7 @@ var watch_security_prefs = function (onSettingChanged) {
let prefNames = Object.keys(kSecuritySettings); let prefNames = Object.keys(kSecuritySettings);
let unbindFuncs = []; let unbindFuncs = [];
for (let prefName of prefNames) { for (let prefName of prefNames) {
unbindFuncs.push(bindPref( unbindFuncs.push(bindPrefAndInit(
prefName, () => onSettingChanged(read_setting_from_prefs()))); prefName, () => onSettingChanged(read_setting_from_prefs())));
} }
// Call all the unbind functions. // Call all the unbind functions.
...@@ -102,7 +102,7 @@ var initialize = function () { ...@@ -102,7 +102,7 @@ var initialize = function () {
initialized = true; initialized = true;
// When security_custom is set to false, apply security_slider setting // When security_custom is set to false, apply security_slider setting
// to the security-sensitive prefs. // to the security-sensitive prefs.
bindPref(kCustomPref, function (custom) { bindPrefAndInit(kCustomPref, function (custom) {
if (custom === false) { if (custom === false) {
write_setting_to_prefs(getIntPref(kSliderPref)); write_setting_to_prefs(getIntPref(kSliderPref));
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment