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

Unified Diff: ipc/mojo/ipc_channel_mojo.cc

Issue 554363004: ChannelMojo: Handle errors in pending message processing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | ipc/mojo/ipc_channel_mojo_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/mojo/ipc_channel_mojo.cc
diff --git a/ipc/mojo/ipc_channel_mojo.cc b/ipc/mojo/ipc_channel_mojo.cc
index 086b420cc52071ef90c7b53cf77249714efd67be..71c373e01cf07a63708871ae3077c121fc0f3e31 100644
--- a/ipc/mojo/ipc_channel_mojo.cc
+++ b/ipc/mojo/ipc_channel_mojo.cc
@@ -175,8 +175,13 @@ void ChannelMojo::OnConnected(mojo::ScopedMessagePipeHandle pipe) {
make_scoped_ptr(new internal::MessageReader(pipe.Pass(), this));
for (size_t i = 0; i < pending_messages_.size(); ++i) {
- message_reader_->Send(make_scoped_ptr(pending_messages_[i]));
+ bool sent = message_reader_->Send(make_scoped_ptr(pending_messages_[i]));
pending_messages_[i] = NULL;
+ if (!sent) {
+ pending_messages_.clear();
+ listener_->OnChannelError();
+ return;
+ }
}
pending_messages_.clear();
« no previous file with comments | « no previous file | ipc/mojo/ipc_channel_mojo_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698