From bad5edbe3e52a016a2fdefdd467c31b0c5708a4b Mon Sep 17 00:00:00 2001 From: jam Date: Mon, 3 Aug 2015 09:35:48 -0700 Subject: [PATCH] Fix dcheck in message port code on Mandoline shutdown. Review URL: https://codereview.chromium.org/1254193003 Cr-Commit-Position: refs/heads/master@{#341536} --- components/message_port/web_message_port_channel_impl.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/message_port/web_message_port_channel_impl.cc b/components/message_port/web_message_port_channel_impl.cc index 69dd18b077db..594b2602d697 100644 --- a/components/message_port/web_message_port_channel_impl.cc +++ b/components/message_port/web_message_port_channel_impl.cc @@ -124,6 +124,10 @@ void WebMessagePortChannelImpl::WaitForNextMessage() { } void WebMessagePortChannelImpl::OnMessageAvailable(MojoResult result) { + // Called when the message loop shuts down. + if (result == MOJO_RESULT_ABORTED) + return; + DCHECK_EQ(MOJO_RESULT_OK, result); if (!client_) return; -- 2.11.4.GIT