From 3ec217a79cde21303ae8f044d80ca7ab3e0bc03c Mon Sep 17 00:00:00 2001 From: Emerick Rogul Date: Tue, 14 Jun 2022 11:31:13 -0400 Subject: [PATCH] Merge pull request #13775 from brave/fix-tor-proxy-task-runner Fix browser crash when setting new Tor connection circuit --- components/tor/tor_profile_service_impl.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/tor/tor_profile_service_impl.cc b/components/tor/tor_profile_service_impl.cc index 6c4f53dce8abf..66bb04f5ef702 100644 --- a/components/tor/tor_profile_service_impl.cc +++ b/components/tor/tor_profile_service_impl.cc @@ -83,10 +83,8 @@ class TorProxyLookupClient : public network::mojom::ProxyLookupClient { mojo::PendingRemote GetProxyLookupClient() { mojo::PendingRemote pending_remote = - receiver_.BindNewPipeAndPassRemote( - base::ThreadPool::CreateSingleThreadTaskRunner( - {content::BrowserThread::UI, - content::BrowserTaskType::kPreconnect})); + receiver_.BindNewPipeAndPassRemote(content::GetUIThreadTaskRunner( + {content::BrowserTaskType::kPreconnect})); receiver_.set_disconnect_handler(base::BindOnce( &TorProxyLookupClient::OnProxyLookupComplete, base::Unretained(this), net::ERR_ABORTED, absl::nullopt));