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

Unified Diff: ipc/mojo/ipc_mojo_bootstrap.cc

Issue 883373002: Revert of IPC::ChannelMojo: Make IPC handling robust against bad messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « ipc/mojo/ipc_mojo_bootstrap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/mojo/ipc_mojo_bootstrap.cc
diff --git a/ipc/mojo/ipc_mojo_bootstrap.cc b/ipc/mojo/ipc_mojo_bootstrap.cc
index a95dae232a1ce1bf7d5dc8c0de2358c8694bbe19..4af4e503a9d27b04efc732b5c6faf935046693a5 100644
--- a/ipc/mojo/ipc_mojo_bootstrap.cc
+++ b/ipc/mojo/ipc_mojo_bootstrap.cc
@@ -100,14 +100,9 @@
}
bool MojoServerBootstrap::OnMessageReceived(const Message&) {
- if (state() != STATE_WAITING_ACK) {
- set_state(STATE_ERROR);
- LOG(ERROR) << "Got inconsistent message from client.";
- return false;
- }
-
+ DCHECK_EQ(state(), STATE_WAITING_ACK);
set_state(STATE_READY);
- CHECK(server_pipe_.is_valid());
+
delegate()->OnPipeAvailable(
mojo::embedder::ScopedPlatformHandle(server_pipe_.release()));
@@ -134,12 +129,6 @@
}
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)) {
« no previous file with comments | « ipc/mojo/ipc_mojo_bootstrap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698