| Index: content/child/child_thread_impl.cc
|
| diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
|
| index bb3cd6d79179a22543958a498ebf77b4e0e59176..88ffed79bd83f5896ced6a96863c660ec377e302 100644
|
| --- a/content/child/child_thread_impl.cc
|
| +++ b/content/child/child_thread_impl.cc
|
| @@ -297,6 +297,13 @@ ChildThreadImpl::Options::Builder::AddStartupFilter(
|
| return *this;
|
| }
|
|
|
| +ChildThreadImpl::Options::Builder&
|
| +ChildThreadImpl::Options::Builder::ListenerTaskRunner(
|
| + scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
|
| + options_.listener_task_runner = task_runner;
|
| + return *this;
|
| +}
|
| +
|
| ChildThreadImpl::Options ChildThreadImpl::Options::Builder::Build() {
|
| return options_;
|
| }
|
| @@ -443,6 +450,10 @@ void ChildThreadImpl::Init(const Options& options) {
|
| channel_->AddFilter(startup_filter);
|
| }
|
|
|
| + // Set listener task runner before connect channel to avoid data race.
|
| + if (options.listener_task_runner) {
|
| + channel_->SetListenerTaskRunner(options.listener_task_runner);
|
| + }
|
| ConnectChannel(options.use_mojo_channel);
|
|
|
| int connection_timeout = kConnectionTimeoutS;
|
|
|