[tor-commits] [tor-launcher/master] Bug #10147: Adblock Plus interferes w/Tor Launcher dialog
brade at torproject.org
brade at torproject.org
Mon Dec 9 20:12:10 UTC 2013
commit 4bbb3e86f314e793f5939ec70993fe9433048b66
Author: Kathy Brade <brade at pearlcrescent.com>
Date: Mon Dec 9 15:07:24 2013 -0500
Bug #10147: Adblock Plus interferes w/Tor Launcher dialog
During progress window init, check the status of the Tor bootstrap
process and close the progress window immediately if bootstrapping is
complete or if an error has occurred.
---
src/chrome/content/progress.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/chrome/content/progress.js b/src/chrome/content/progress.js
index 6a826e0..8a2f427 100644
--- a/src/chrome/content/progress.js
+++ b/src/chrome/content/progress.js
@@ -21,6 +21,21 @@ var gOpenerCallbackFunc; // Set when opened from network settings.
function initDialog()
{
+ // If tor bootstrap has already finished, just close the progress dialog.
+ // This situation can occur if bootstrapping is very fast and/or if this
+ // window opens slowly (observed with Adblock Plus installed).
+ try
+ {
+ var processSvc = Cc["@torproject.org/torlauncher-process-service;1"]
+ .getService(Ci.nsISupports).wrappedJSObject;
+ if (processSvc.TorIsBootstrapDone || processSvc.TorBootstrapErrorOccurred)
+ {
+ closeThisWindow(processSvc.TorIsBootstrapDone);
+ return;
+ }
+ }
+ catch (e) { dump(e + "\n"); }
+
try
{
gObsSvc = Cc["@mozilla.org/observer-service;1"]
More information about the tor-commits
mailing list