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..d6e8906dd81f641579bf06d1de202943f6e1c453 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,16 @@ 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 (base::CommandLine::ForCurrentProcess()->HasSwitch( |
jam
2015/03/03 04:32:22
use run_renderer_in_process()
Ken Rockot(use gerrit already)
2015/03/03 06:13:31
Done.
|
+ switches::kSingleProcess)) { |
+ ChannelInit::SetSingleProcessIOTaskRunner(io_task_runner); |
} |
return IPC::ChannelProxy::Create( |