Pier Angelo Vendrame pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits: 014f6414 by Pier Angelo Vendrame at 2023-06-01T22:03:04+02:00 fixup! Bug 40597: Implement TorSettings module
Bug 41801: Fix handleProcessReady in TorSettings.init
- - - - -
1 changed file:
- browser/modules/TorSettings.jsm
Changes:
===================================== browser/modules/TorSettings.jsm ===================================== @@ -299,7 +299,7 @@ const TorSettings = (() => { Services.obs.addObserver(this, TorTopics.ProcessIsReady);
if (TorMonitorService.isRunning) { - handleProcessReady(); + this.handleProcessReady(); } } }, @@ -308,22 +308,22 @@ const TorSettings = (() => { async observe(subject, topic, data) { console.log(`TorSettings: Observed ${topic}`);
- // once the tor daemon is ready, we need to apply our settings - const handleProcessReady = async () => { - // push down settings to tor - await this.applySettings(); - console.log("TorSettings: Ready"); - Services.obs.notifyObservers(null, TorSettingsTopics.Ready); - }; - switch (topic) { case TorTopics.ProcessIsReady: Services.obs.removeObserver(this, TorTopics.ProcessIsReady); - await handleProcessReady(); + await this.handleProcessReady(); break; } },
+ // once the tor daemon is ready, we need to apply our settings + async handleProcessReady() { + // push down settings to tor + await this.applySettings(); + console.log("TorSettings: Ready"); + Services.obs.notifyObservers(null, TorSettingsTopics.Ready); + }, + // load our settings from prefs loadFromPrefs() { console.log("TorSettings: loadFromPrefs()");
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/014f6414...
tor-commits@lists.torproject.org