commit 299c899dc7334b66f1e443ab7f1001c7a8b40a3a Author: Matthew Finkel sysrqb@torproject.org Date: Fri Sep 3 03:52:30 2021 +0000
fixup! Bug 40597: Implement TorSettings module
This reverts commit 9bf09ae43912f868ff5ffdb2faba5469a6fdd2a7. --- browser/modules/TorSettings.jsm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/browser/modules/TorSettings.jsm b/browser/modules/TorSettings.jsm index f88b85647944..848925fd7b29 100644 --- a/browser/modules/TorSettings.jsm +++ b/browser/modules/TorSettings.jsm @@ -317,7 +317,7 @@ const TorSettings = (() => { },
/* wait for relevant life-cycle events to load and/or apply saved settings */ - observe: function(subject, topic, data) { + observe: async function(subject, topic, data) { console.log(`TorSettings: observed ${topic}`);
// once the process is ready, we need to apply our settings @@ -325,11 +325,13 @@ const TorSettings = (() => { Services.obs.removeObserver(this, TorTopics.ProcessIsReady); if (this._settings == null) { // load settings from tor if our load in init() failed and save them to prefs - this.loadLegacy().then((result) => { this.saveToPrefs(); Services.obs.notifyObservers(null, TorSettingsTopics.Ready);}); + await this.loadLegacy(); + this.saveToPrefs(); } else { // push down settings to tor - this.applySettings().then((result) => Services.obs.notifyObservers(null, TorSettingsTopics.Ready)); + await this.applySettings(); } + Services.obs.notifyObservers(null, TorSettingsTopics.Ready); };
switch (topic) {
tor-commits@lists.torproject.org