[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] fixup! Bug 40597: Implement TorSettings module
Pier Angelo Vendrame (@pierov)
git at gitlab.torproject.org
Mon Jun 5 16:38:29 UTC 2023
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/014f6414068e3d535a8c8c93910d0e5e01c45bf3
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/014f6414068e3d535a8c8c93910d0e5e01c45bf3
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20230605/be1970c5/attachment-0001.htm>
More information about the tor-commits
mailing list