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

sysrqb at torproject.org sysrqb at torproject.org
Wed Oct 6 13:32:12 UTC 2021


commit e316ca1154f09bca94c7db549a658bb1e73fab7d
Author: Matthew Finkel <sysrqb at torproject.org>
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)
                     {





More information about the tbb-commits mailing list