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

Unified Diff: content/common/mojo/mojo_shell_connection_impl.cc

Issue 1685183004: Bootstrap Mojo IPC independent of Chrome IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: and fix posix Created 4 years, 10 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/common/mojo/mojo_shell_connection_impl.cc
diff --git a/content/common/mojo/mojo_shell_connection_impl.cc b/content/common/mojo/mojo_shell_connection_impl.cc
index 79256c85f47e548430a272524bade045a80c80e0..ae18f62dd7efc42c26ee3db3758a31bca961ea0c 100644
--- a/content/common/mojo/mojo_shell_connection_impl.cc
+++ b/content/common/mojo/mojo_shell_connection_impl.cc
@@ -17,6 +17,7 @@
namespace content {
namespace {
+
using MojoShellConnectionPtr =
base::ThreadLocalPointer<MojoShellConnectionImpl>;
@@ -66,7 +67,13 @@ void MojoShellConnectionImpl::WaitForShell(
mojo::ScopedMessagePipeHandle handle) {
mojo::ShellClientRequest request;
runner_connection_.reset(mojo::shell::RunnerConnection::ConnectToRunner(
- &request, std::move(handle)));
+ &request, std::move(handle), false /* exit_on_error */));
+ if (!runner_connection_) {
+ DLOG(ERROR) << "Unable to connect to the Mojo shell.";
+ delete this;
+ lazy_tls_ptr.Pointer()->Set(nullptr);
+ return;
+ }
shell_connection_.reset(new mojo::ShellConnection(this, std::move(request)));
shell_connection_->WaitForInitialize();
}

Powered by Google App Engine
This is Rietveld 408576698