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

[tor-commits] [tor-browser/tor-browser-91.2.0esr-11.0-1] fixup! Bug 40597: Implement TorSettings module



commit e316ca1154f09bca94c7db549a658bb1e73fab7d
Author: Matthew Finkel <sysrqb@xxxxxxxxxxxxxx>
Date:   Wed Sep 8 19:52:19 2021 +0000

    fixup! Bug 40597: Implement TorSettings module
---
 browser/modules/TorSettings.jsm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/browser/modules/TorSettings.jsm b/browser/modules/TorSettings.jsm
index ae5d3d49f298..6d2a6c4a07cf 100644
--- a/browser/modules/TorSettings.jsm
+++ b/browser/modules/TorSettings.jsm
@@ -710,7 +710,10 @@ const TorSettings = (() => {
         // Quickstart
         get quickstart() {
             return {
-                get enabled() { return self._settings.quickstart.enabled; },
+                // Avoid a race-condition on first-start where this property
+                // may be accessed before `self._settings` is initialized.
+                // This work-around can be removed when #40598 is resolved.
+                get enabled() { return (self._settings ? self._settings.quickstart.enabled : false); },
                 set enabled(val) {
                     if (val != self._settings.quickstart.enabled)
                     {



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