richard pushed to branch tor-browser-115.1.0esr-13.0-1 at The Tor Project / 
Applications / Tor Browser


Commits:
f0493f9f by Pier Angelo Vendrame at 2023-07-27T18:20:08+00:00
fixup! Bug 40597: Implement TorSettings module

Bug 41907: Change state after the process becomes ready only when we
are in the initial state.

- - - - -


1 changed file:

- browser/modules/TorConnect.jsm


Changes:

=====================================
browser/modules/TorConnect.jsm
=====================================
@@ -874,6 +874,18 @@ const TorConnect = (() => {
       switch (topic) {
         /* We need to wait until TorSettings have been loaded and applied 
before we can Quickstart */
         case TorSettingsTopics.Ready: {
+          // tor-browser#41907: This is only a workaround to avoid users being
+          // bounced back to the initial panel without any explanation.
+          // Longer term we should disable the clickable elements, or find a UX
+          // to prevent this from happening (e.g., allow buttons to be clicked,
+          // but show an intermediate starting state, or a message that tor is
+          // starting while the butons are disabled, etc...).
+          if (this.state !== TorConnectState.Initial) {
+            console.warn(
+              "TorConnect: Seen the torsettings:ready after the state has 
already changed, ignoring the notification."
+            );
+            break;
+          }
           if (this.shouldQuickStart) {
             // Quickstart
             this._changeState(TorConnectState.Bootstrapping);



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f0493f9f8602a2c59c30cc2614f53b56c29f4f40

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f0493f9f8602a2c59c30cc2614f53b56c29f4f40
You're receiving this email because of your account on gitlab.torproject.org.


_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to