Skip to content

Commit

Permalink
Fix crash when automatically opening onion site and close the tor window
Browse files Browse the repository at this point in the history
at browser startup

[8357:775:1008/110058.682124:FATAL:remote.h(97)] Check failed: is_bound(). Cannot issue Interface method calls on an unbound Remote
0   libbase.dylib                       0x000000010eb7c7b9 base::debug::CollectStackTrace(void**, unsigned long) + 9
1   libbase.dylib                       0x000000010ea67f43 base::debug::StackTrace::StackTrace() + 19
2   libbase.dylib                       0x000000010ea8b075 logging::LogMessage::~LogMessage() + 261
3   libbase.dylib                       0x000000010ea8bd5e logging::LogMessage::~LogMessage() + 14
4   libchrome_dll.dylib                 0x0000000114832d6b TorLauncherFactory::OnTorControlCheckComplete() + 219
5   libchrome_dll.dylib                 0x00000001148361cb base::internal::Invoker<base::internal::BindState<void (TorLauncherFactory::*)(), base::WeakPtr<TorLauncherFactory> >, void ()>::RunOnce(base::internal::BindStateBase*) + 155
6   libbase.dylib                       0x000000010eb09dbb base::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 411
  • Loading branch information
darkdh committed Oct 9, 2020
1 parent 652e654 commit 6217b91
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions browser/tor/tor_launcher_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,13 @@ void TorLauncherFactory::LaunchTorProcess(const tor::TorConfig& config) {

void TorLauncherFactory::OnTorControlCheckComplete() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
tor_launcher_->Launch(config_,
base::BindOnce(&TorLauncherFactory::OnTorLaunched,
weak_ptr_factory_.GetWeakPtr()));
if (tor_launcher_.is_bound()) {
tor_launcher_->Launch(config_,
base::BindOnce(&TorLauncherFactory::OnTorLaunched,
weak_ptr_factory_.GetWeakPtr()));
} else {
is_starting_ = false;
}
}

void TorLauncherFactory::KillTorProcess() {
Expand Down

0 comments on commit 6217b91

Please sign in to comment.