| Index: ipc/mojo/ipc_mojo_bootstrap.cc
|
| diff --git a/ipc/mojo/ipc_mojo_bootstrap.cc b/ipc/mojo/ipc_mojo_bootstrap.cc
|
| index 4af4e503a9d27b04efc732b5c6faf935046693a5..a95dae232a1ce1bf7d5dc8c0de2358c8694bbe19 100644
|
| --- a/ipc/mojo/ipc_mojo_bootstrap.cc
|
| +++ b/ipc/mojo/ipc_mojo_bootstrap.cc
|
| @@ -100,9 +100,14 @@
|
| }
|
|
|
| bool MojoServerBootstrap::OnMessageReceived(const Message&) {
|
| - DCHECK_EQ(state(), STATE_WAITING_ACK);
|
| + if (state() != STATE_WAITING_ACK) {
|
| + set_state(STATE_ERROR);
|
| + LOG(ERROR) << "Got inconsistent message from client.";
|
| + return false;
|
| + }
|
| +
|
| set_state(STATE_READY);
|
| -
|
| + CHECK(server_pipe_.is_valid());
|
| delegate()->OnPipeAvailable(
|
| mojo::embedder::ScopedPlatformHandle(server_pipe_.release()));
|
|
|
| @@ -129,6 +134,12 @@
|
| }
|
|
|
| bool MojoClientBootstrap::OnMessageReceived(const Message& message) {
|
| + if (state() != STATE_INITIALIZED) {
|
| + set_state(STATE_ERROR);
|
| + LOG(ERROR) << "Got inconsistent message from server.";
|
| + return false;
|
| + }
|
| +
|
| PlatformFileForTransit pipe;
|
| PickleIterator iter(message);
|
| if (!ParamTraits<PlatformFileForTransit>::Read(&message, &iter, &pipe)) {
|
|
|