summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_sync_channel.cc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-10 20:07:53 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-10 20:07:53 +0000
commit9134cce6dc08d7e5962c228ecc1c5a1244e233ae (patch)
tree68732b438b0db89b94ae2436d7f46d40313155f5 /ipc/ipc_sync_channel.cc
parent91eb959385f07cf38b90f26ec3be4499b1f264ea (diff)
downloadchromium_src-9134cce6dc08d7e5962c228ecc1c5a1244e233ae.zip
chromium_src-9134cce6dc08d7e5962c228ecc1c5a1244e233ae.tar.gz
chromium_src-9134cce6dc08d7e5962c228ecc1c5a1244e233ae.tar.bz2
ipc: don't treat replies with the unblock flag set as regular messages
Old behavior would test should_unblock() before is_reply() so if both were set but TryToUnblockListener wouldn't return true (the corresponding Send isn't on top of the stack), it would queue the message as to be dispatched. This restores the correct order. BUG=122443 TEST=ipc_tests, in particular ReentrantReply Review URL: http://codereview.chromium.org/9960058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131617 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_sync_channel.cc')
-rw-r--r--ipc/ipc_sync_channel.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index 2763ebd32..b9dc2c5 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -323,13 +323,13 @@ bool SyncChannel::SyncContext::OnMessageReceived(const Message& msg) {
if (TryToUnblockListener(&msg))
return true;
- if (msg.should_unblock()) {
- received_sync_msgs_->QueueMessage(msg, this);
+ if (msg.is_reply()) {
+ received_sync_msgs_->QueueReply(msg, this);
return true;
}
- if (msg.is_reply()) {
- received_sync_msgs_->QueueReply(msg, this);
+ if (msg.should_unblock()) {
+ received_sync_msgs_->QueueMessage(msg, this);
return true;
}