| Index: content/child/child_thread_impl.cc
|
| diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
|
| index f0b739ca5daecae7b3ce2c3d4c2d7b2ae77233a2..1fe1254f7d5e72f94bf34034811cd8b9d19052b6 100644
|
| --- a/content/child/child_thread_impl.cc
|
| +++ b/content/child/child_thread_impl.cc
|
| @@ -404,6 +404,7 @@ void ChildThreadImpl::Init(const Options& options) {
|
| g_lazy_tls.Pointer()->Set(this);
|
| on_channel_error_called_ = false;
|
| message_loop_ = base::MessageLoop::current();
|
| + main_task_runner_ = message_loop_->task_runner();
|
| #ifdef IPC_MESSAGE_LOG_ENABLED
|
| // We must make sure to instantiate the IPC Logger *before* we create the
|
| // channel, otherwise we can get a callback on the IO thread which creates
|
| @@ -466,7 +467,7 @@ void ChildThreadImpl::Init(const Options& options) {
|
|
|
| sync_message_filter_ = channel_->CreateSyncMessageFilter();
|
| thread_safe_sender_ = new ThreadSafeSender(
|
| - message_loop_->task_runner(), sync_message_filter_.get());
|
| + main_task_runner_, sync_message_filter_.get());
|
|
|
| resource_dispatcher_.reset(new ResourceDispatcher(
|
| this, message_loop()->task_runner()));
|
| @@ -544,7 +545,7 @@ void ChildThreadImpl::Init(const Options& options) {
|
| connection_timeout = temp;
|
| }
|
|
|
| - message_loop_->task_runner()->PostDelayedTask(
|
| + main_task_runner_->PostDelayedTask(
|
| FROM_HERE, base::Bind(&ChildThreadImpl::EnsureConnected,
|
| channel_connected_factory_->GetWeakPtr()),
|
| base::TimeDelta::FromSeconds(connection_timeout));
|
| @@ -593,6 +594,7 @@ void ChildThreadImpl::Shutdown() {
|
| file_system_dispatcher_.reset();
|
| quota_dispatcher_.reset();
|
| WebFileSystemImpl::DeleteThreadSpecificInstance();
|
| + message_loop_ = nullptr;
|
| }
|
|
|
| void ChildThreadImpl::ShutdownDiscardableSharedMemoryManager() {
|
| @@ -609,7 +611,7 @@ void ChildThreadImpl::OnChannelError() {
|
| }
|
|
|
| bool ChildThreadImpl::Send(IPC::Message* msg) {
|
| - DCHECK(message_loop_->task_runner()->BelongsToCurrentThread());
|
| + DCHECK(main_task_runner_->BelongsToCurrentThread());
|
| if (!channel_) {
|
| delete msg;
|
| return false;
|
| @@ -656,13 +658,13 @@ shell::InterfaceProvider* ChildThreadImpl::GetRemoteInterfaces() {
|
| }
|
|
|
| IPC::MessageRouter* ChildThreadImpl::GetRouter() {
|
| - DCHECK(message_loop_->task_runner()->BelongsToCurrentThread());
|
| + DCHECK(main_task_runner_->BelongsToCurrentThread());
|
| return &router_;
|
| }
|
|
|
| std::unique_ptr<base::SharedMemory> ChildThreadImpl::AllocateSharedMemory(
|
| size_t buf_size) {
|
| - DCHECK(message_loop_->task_runner()->BelongsToCurrentThread());
|
| + DCHECK(main_task_runner_->BelongsToCurrentThread());
|
| return AllocateSharedMemory(buf_size, this, nullptr);
|
| }
|
|
|
|
|