Index: ipc/mojo/ipc_mojo_bootstrap.cc |
diff --git a/ipc/mojo/ipc_mojo_bootstrap.cc b/ipc/mojo/ipc_mojo_bootstrap.cc |
index 7233de0fa2d0259b5389f5e1306397b81f9683fa..30c33a89f7c0f4409b4181e718b496f78b0f0d8d 100644 |
--- a/ipc/mojo/ipc_mojo_bootstrap.cc |
+++ b/ipc/mojo/ipc_mojo_bootstrap.cc |
@@ -84,6 +84,9 @@ void MojoServerBootstrap::SendClientPipeIfReady() { |
} |
void MojoServerBootstrap::OnClientLaunched(base::ProcessHandle process) { |
+ if (HasFailed()) |
+ return; |
+ |
DCHECK_EQ(state(), STATE_INITIALIZED); |
DCHECK_NE(process, base::kNullProcessHandle); |
client_process_ = process; |
@@ -202,6 +205,10 @@ void MojoBootstrap::Fail() { |
delegate()->OnBootstrapError(); |
} |
+bool MojoBootstrap::HasFailed() const { |
+ return state() == STATE_ERROR; |
+} |
+ |
bool MojoBootstrap::Send(Message* message) { |
return channel_->Send(message); |
} |