GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still and

Commit 98f3df12 authored by Kathleen Brade's avatar Kathleen Brade

Bug 34164: Tor Launcher deadlocks during startup (Firefox 77)

Initialize the DNS service as early as possible to avoid a problem
where DNS service initialization is dispatched to the main thread
while that thread is blocked.
parent ee6c4337
......@@ -100,6 +100,22 @@ TorProcessService.prototype =
if ("profile-after-change" == aTopic)
// Initialize the DNS service here (as early as possible). This
// avoids a deadlock that can occur inside TorProtocolService's
// _openAuthenticatedConnection() function. What happens in the
// deadlock case is that a Necko socket thread tries to dispatch
// initialization of the DNS service to the main thread while the
// main thread is blocked in a writeBytes() call inside the
// _sendCommand() function. The ultimate solution is to change
// our control port socket to use asynchronous I/O.
// References:
// netwerk/dns/nsDNSService2.cpp nsDNSService::GetSingleton()
// (the
// fix for this bug introduced the deadlock because it changed
// DNS service initialization to occur on the main thread).
const dns = Cc[";1"]
this.mObsSvc.addObserver(this, "quit-application-granted", false);
this.mObsSvc.addObserver(this, kOpenNetworkSettingsTopic, false);
this.mObsSvc.addObserver(this, kUserQuitTopic, false);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment