Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(905)

Unified Diff: ipc/ipc_channel_proxy.cc

Issue 2159293002: Plumb explicit IPC task runner through to IPC::Channel creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add dcheck Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_channel_mojo_unittest.cc ('k') | ipc/ipc_channel_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_proxy.cc
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc
index 696a23b5d2a5cc049ec1ca7b5285fddc24665e0c..25229acc5afde66acedcf3c352d7ef0e29c6baa9 100644
--- a/ipc/ipc_channel_proxy.cc
+++ b/ipc/ipc_channel_proxy.cc
@@ -74,6 +74,7 @@ void ChannelProxy::Context::CreateChannel(
std::unique_ptr<ChannelFactory> factory) {
base::AutoLock l(channel_lifetime_lock_);
DCHECK(!channel_);
+ DCHECK_EQ(factory->GetIPCTaskRunner(), ipc_task_runner_);
channel_id_ = factory->GetName();
channel_ = factory->BuildChannel(this);
channel_send_thread_safe_ = channel_->IsSendThreadSafe();
@@ -432,8 +433,7 @@ std::unique_ptr<ChannelProxy> ChannelProxy::Create(
}
ChannelProxy::ChannelProxy(Context* context)
- : context_(context),
- did_init_(false) {
+ : context_(context), did_init_(false) {
#if defined(ENABLE_IPC_FUZZER)
outgoing_message_filter_ = NULL;
#endif
@@ -466,7 +466,9 @@ void ChannelProxy::Init(const IPC::ChannelHandle& channel_handle,
create_pipe_now = true;
}
#endif // defined(OS_POSIX)
- Init(ChannelFactory::Create(channel_handle, mode), create_pipe_now);
+ Init(
+ ChannelFactory::Create(channel_handle, mode, context_->ipc_task_runner()),
+ create_pipe_now);
}
void ChannelProxy::Init(std::unique_ptr<ChannelFactory> factory,
« no previous file with comments | « ipc/ipc_channel_mojo_unittest.cc ('k') | ipc/ipc_channel_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698