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

Unified Diff: ipc/ipc_channel_reader.cc

Issue 25325002: workaround for mac kernel bug (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor bugfix Created 7 years, 2 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/ipc_channel_reader.h ('k') | ipc/ipc_channel_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_reader.cc
diff --git a/ipc/ipc_channel_reader.cc b/ipc/ipc_channel_reader.cc
index 9055deb17759d39ebd82b22083b2e8609a15827e..2ee7449ea8de33a7d85b7bebadf30c4fe42549f5 100644
--- a/ipc/ipc_channel_reader.cc
+++ b/ipc/ipc_channel_reader.cc
@@ -38,9 +38,15 @@ bool ChannelReader::AsyncReadComplete(int bytes_read) {
return DispatchInputData(input_buf_, bytes_read);
}
+bool ChannelReader::IsInternalMessage(const Message& m) const {
+ return m.routing_id() == MSG_ROUTING_NONE &&
+ m.type() >= Channel::CLOSE_FD_MESSAGE_TYPE &&
+ m.type() <= Channel::HELLO_MESSAGE_TYPE;
+}
+
bool ChannelReader::IsHelloMessage(const Message& m) const {
return m.routing_id() == MSG_ROUTING_NONE &&
- m.type() == Channel::HELLO_MESSAGE_TYPE;
+ m.type() == Channel::HELLO_MESSAGE_TYPE;
}
bool ChannelReader::DispatchInputData(const char* input_data,
@@ -84,8 +90,8 @@ bool ChannelReader::DispatchInputData(const char* input_data,
"line", IPC_MESSAGE_ID_LINE(m.type()));
#endif
m.TraceMessageEnd();
- if (IsHelloMessage(m))
- HandleHelloMessage(m);
+ if (IsInternalMessage(m))
+ HandleInternalMessage(m);
else
listener_->OnMessageReceived(m);
p = message_tail;
« no previous file with comments | « ipc/ipc_channel_reader.h ('k') | ipc/ipc_channel_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698