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(); |
} |