summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authormorrita <morrita@chromium.org>2015-06-11 11:38:57 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-11 18:40:48 +0000
commit0b35325d7b5e25f4942f79e3f4d6269c36f1c2e0 (patch)
treeff01db1c63f9bead371ef197d3d8207d29ed3366 /ipc
parentf714e984a988e6f546516f3bb48af5156107334e (diff)
downloadchromium_src-0b35325d7b5e25f4942f79e3f4d6269c36f1c2e0.zip
chromium_src-0b35325d7b5e25f4942f79e3f4d6269c36f1c2e0.tar.gz
chromium_src-0b35325d7b5e25f4942f79e3f4d6269c36f1c2e0.tar.bz2
ChannelMojo: Make MOJO_RESULT_FAILED_PRECONDITION an error.
ChannelMojo used to ignore this error, which signals a closed peer, and silently closes the channel. This CL let it resuls an error because the old behavior seems incompatible to traditional IPC::Channel implementations. To sheriffs: This is likely to be what you are looking for if you're chasing mysterious hangs or crashes with no stack traces. The change is subtle, but possibly causes such kind of errors. R=viettrungluu@chromium.org,agl@chromium.org BUG=488291 Review URL: https://codereview.chromium.org/1175083002 Cr-Commit-Position: refs/heads/master@{#333995}
Diffstat (limited to 'ipc')
-rw-r--r--ipc/mojo/ipc_message_pipe_reader.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/ipc/mojo/ipc_message_pipe_reader.cc b/ipc/mojo/ipc_message_pipe_reader.cc
index 35ba7fd6..44bd10a 100644
--- a/ipc/mojo/ipc_message_pipe_reader.cc
+++ b/ipc/mojo/ipc_message_pipe_reader.cc
@@ -152,14 +152,9 @@ void MessagePipeReader::ReadAvailableMessages() {
if (read_result == MOJO_RESULT_SHOULD_WAIT)
break;
if (read_result != MOJO_RESULT_OK) {
- // FAILED_PRECONDITION means that all the received messages
- // got consumed and the peer is already closed.
- if (read_result != MOJO_RESULT_FAILED_PRECONDITION) {
- DLOG(WARNING)
- << "Pipe got error from ReadMessage(). Closing: " << read_result;
- OnPipeError(read_result);
- }
-
+ DLOG(WARNING)
+ << "Pipe got error from ReadMessage(). Closing: " << read_result;
+ OnPipeError(read_result);
Close();
break;
}