[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #9531 [Tor Browser]: More Torbutton hangs on New Identity control port access
#9531: More Torbutton hangs on New Identity control port access
-------------------------+-------------------------------------------------
Reporter: | Owner: gk
mikeperry | Status: closed
Type: defect | Milestone:
Priority: major | Version:
Component: Tor | Keywords: tbb-usability, tbb-newnym,
Browser | TorBrowserTeam201408, tbb-torbutton,
Resolution: fixed | MikePerry201408R
Actual Points: | Parent ID:
Points: |
-------------------------+-------------------------------------------------
Comment (by cypherpunks):
> There a blank Tor Launcher window is visible for a short amount of time
until the usual messages appear giving a weird user experience.
Tor Launcher could to finish every stuff for progress document before
starting socket transport operations.
This specially crafted workaround reducing negative user experience.
{{{
diff --git a/src/components/tl-process.js b/src/components/tl-process.js
index cc5d654..31d4e45 100644
--- a/src/components/tl-process.js
+++ b/src/components/tl-process.js
@@ -91,6 +91,7 @@ TorProcessService.prototype =
if ("profile-after-change" == aTopic)
{
this.mObsSvc.addObserver(this, "quit-application-granted", false);
+ this.mObsSvc.addObserver(this, "document-shown", false);
this.mObsSvc.addObserver(this, kOpenNetworkSettingsTopic, false);
this.mObsSvc.addObserver(this, kUserQuitTopic, false);
this.mObsSvc.addObserver(this, kBootstrapStatusTopic, false);
@@ -169,6 +170,17 @@ TorProcessService.prototype =
}
}
}
+ else if ("document-shown" == aTopic)
+ {
+ if (aSubject.getElementById("progressMeter"))
+ ++this.mDocumentProgressShown;
+ else
+ this.mDocumentProgressShown = 0;
+ if (!this.mDocumentProgressShown || this.mDocumentProgressShown ==
3) {
+ this._monitorTorProcessStartup();
+ this.mObsSvc.removeObserver(this, "document-shown");
+ }
+ }
else if ("timer-callback" == aTopic)
{
if (aSubject == this.mControlConnTimer)
@@ -296,6 +308,7 @@ TorProcessService.prototype =
mRestartWithQuit: false,
mLastTorWarningPhase: null,
mLastTorWarningReason: null,
+ mDocumentProgressShown: 0,
// Private Methods
/////////////////////////////////////////////////////////
@@ -426,7 +439,6 @@ TorProcessService.prototype =
{
try
{
- this._monitorTorProcessStartup();
var bridgeConfigIsBad = (this._defaultBridgesStatus ==
this.kDefaultBridgesStatus_BadConfig);
}}}
With more knowledge it could be less kludgy fix.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9531#comment:47>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs