commit 152563c8869ec07b7e8e6e18161992934d935b11 Author: Matthew Finkel sysrqb@torproject.org Date: Wed Jun 30 19:36:46 2021 +0000
fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser --- browser/components/BrowserGlue.jsm | 5 +++-- toolkit/mozapps/update/UpdateService.jsm | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm index 7c832f62386e..914b782afdb1 100644 --- a/browser/components/BrowserGlue.jsm +++ b/browser/components/BrowserGlue.jsm @@ -2514,8 +2514,9 @@ BrowserGlue.prototype = {
{ task: () => { - if (TorProtocolService.isBootstrapDone()) { - // we will take this path when the user is using the legacy tor launcher + if (TorProtocolService.isBootstrapDone() || !TorProtocolService.ownsTorDaemon) { + // we will take this path when the user is using the legacy tor launcher or + // when Tor Browser didn't launch its own tor. OnionAliasStore.init(); } else { // this path is taken when using about:torconnect, we wait to init diff --git a/toolkit/mozapps/update/UpdateService.jsm b/toolkit/mozapps/update/UpdateService.jsm index 5bd778ce47e2..6d0c79222577 100644 --- a/toolkit/mozapps/update/UpdateService.jsm +++ b/toolkit/mozapps/update/UpdateService.jsm @@ -2698,8 +2698,10 @@ UpdateService.prototype = { } return; } else if (update.errorCode == PROXY_SERVER_CONNECTION_REFUSED && - !TorProtocolService.isBootstrapDone()) { - // Register boostrap observer to try again + !TorProtocolService.isBootstrapDone() && + TorProtocolService.ownsTorDaemon) { + // Register boostrap observer to try again, but only when we own the + // tor process. this._registerBootstrapObserver(); return; }
tor-commits@lists.torproject.org