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

Unified Diff: content/child/child_thread_impl.cc

Issue 1585493002: [mojo] Ports EDK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: content/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 5f5b949601a49faeb6912ff316e50fb636d4a816..538380397b7531af2ca4b553f2395dc751e7a4e3 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -388,7 +388,11 @@ void ChildThreadImpl::Init(const Options& options) {
IPC::Logging::GetInstance()->SetIPCSender(this);
#endif
- mojo_ipc_support_.reset(new IPC::ScopedIPCSupport(GetIOTaskRunner()));
+ if (!IsInBrowserProcess()) {
+ // Don't double-initialize IPC support in single-process mode.
+ mojo_ipc_support_.reset(new IPC::ScopedIPCSupport(GetIOTaskRunner()));
+ }
+
mojo_application_.reset(new MojoApplication(GetIOTaskRunner()));
sync_message_filter_ = channel_->CreateSyncMessageFilter();
@@ -687,10 +691,10 @@ void ChildThreadImpl::OnBindExternalMojoShellHandle(
#elif defined(OS_WIN)
base::PlatformFile handle = file;
#endif
- mojo::ScopedMessagePipeHandle message_pipe =
- mojo_shell_channel_init_.Init(handle, GetIOTaskRunner());
- DCHECK(message_pipe.is_valid());
- MojoShellConnectionImpl::Get()->BindToMessagePipe(std::move(message_pipe));
+ mojo_shell_channel_init_.Init(
+ handle, GetIOTaskRunner(),
+ base::Bind(&MojoShellConnectionImpl::BindToMessagePipe,
+ base::Unretained(MojoShellConnectionImpl::Get())));
#endif // defined(MOJO_SHELL_CLIENT)
}

Powered by Google App Engine
This is Rietveld 408576698