Index: content/browser/renderer_host/render_process_host_impl.cc |
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
index 6564c4387af6adf60c5fec2b6075833d5bbef054..16aa989e6f28d54e2798e72b8b0370d7a6bbe9fe 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -110,6 +110,7 @@ |
#include "content/common/frame_messages.h" |
#include "content/common/gpu/gpu_memory_buffer_factory.h" |
#include "content/common/gpu/gpu_messages.h" |
+#include "content/common/mojo/channel_init.h" |
#include "content/common/mojo/mojo_messages.h" |
#include "content/common/resource_messages.h" |
#include "content/common/view_messages.h" |
@@ -664,9 +665,15 @@ scoped_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy( |
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
if (ShouldUseMojoChannel()) { |
VLOG(1) << "Mojo Channel is enabled on host"; |
+ scoped_refptr<base::TaskRunner> io_task_runner = |
+ BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) |
+ ->task_runner(); |
if (!channel_mojo_host_) { |
- channel_mojo_host_.reset(new IPC::ChannelMojoHost( |
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); |
+ channel_mojo_host_.reset(new IPC::ChannelMojoHost(io_task_runner)); |
+ } |
+ |
+ if (run_renderer_in_process()) { |
+ ChannelInit::SetSingleProcessIOTaskRunner(io_task_runner); |
} |
return IPC::ChannelProxy::Create( |