summaryrefslogtreecommitdiffstats
path: root/components/message_port
diff options
context:
space:
mode:
authorsadrul <sadrul@chromium.org>2015-09-15 14:16:39 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-15 21:17:22 +0000
commitf4b3d32ef7b52b7cf7dd93571793b9e944f798d0 (patch)
tree706a492d7ab5b04eb86627c776884d7f33467e66 /components/message_port
parent36dfcfc78f7f50152e0a489d64c1e4299fac25ce (diff)
downloadchromium_src-f4b3d32ef7b52b7cf7dd93571793b9e944f798d0.zip
chromium_src-f4b3d32ef7b52b7cf7dd93571793b9e944f798d0.tar.gz
chromium_src-f4b3d32ef7b52b7cf7dd93571793b9e944f798d0.tar.bz2
message_port: Fix DCHECK to not fail on MOJO_RESULT_FAILED_PRECONDITION.
BUG=532167 Review URL: https://codereview.chromium.org/1346643004 Cr-Commit-Position: refs/heads/master@{#348996}
Diffstat (limited to 'components/message_port')
-rw-r--r--components/message_port/web_message_port_channel_impl.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/message_port/web_message_port_channel_impl.cc b/components/message_port/web_message_port_channel_impl.cc
index 594b260..db30963 100644
--- a/components/message_port/web_message_port_channel_impl.cc
+++ b/components/message_port/web_message_port_channel_impl.cc
@@ -124,8 +124,10 @@ void WebMessagePortChannelImpl::WaitForNextMessage() {
}
void WebMessagePortChannelImpl::OnMessageAvailable(MojoResult result) {
- // Called when the message loop shuts down.
- if (result == MOJO_RESULT_ABORTED)
+ // |result| can be MOJO_RESULT_ABORTED when the message loop shuts down, or
+ // MOJO_RESULT_FAILED_PRECONDITION when the end-of-file is reached.
+ if (result == MOJO_RESULT_ABORTED ||
+ result == MOJO_RESULT_FAILED_PRECONDITION)
return;
DCHECK_EQ(MOJO_RESULT_OK, result);