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

Unified Diff: ipc/ipc_sync_channel.cc

Issue 9917002: IPC: change sync channel dispatch restriction to allow dispatch to other channels within the same "… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
Index: ipc/ipc_sync_channel.cc
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index b331779622d858eace9791cc57c0ad1f82a94fbd..832ccf9e945b724ef46a821055cfe446c27cf6ae 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -103,8 +103,8 @@ class SyncChannel::ReceivedSyncMsgQueue :
first_time = false;
}
for (; it != message_queue_.end(); it++) {
- if (!it->context->restrict_dispatch() ||
- it->context == dispatching_context) {
+ if (it->context->restrict_dispatch_group() ==
+ dispatching_context->restrict_dispatch_group()) {
Josh Horwich 2012/03/29 18:29:22 In the old impl, we'd dispatch a message that wasn
piman 2012/03/29 18:56:47 Thanks for finding this. I thought we were doing t
message = it->message;
context = it->context;
it = message_queue_.erase(it);
@@ -228,7 +228,7 @@ SyncChannel::SyncContext::SyncContext(
: ChannelProxy::Context(listener, ipc_thread),
received_sync_msgs_(ReceivedSyncMsgQueue::AddContext()),
shutdown_event_(shutdown_event),
- restrict_dispatch_(false) {
+ restrict_dispatch_group_(0) {
Josh Horwich 2012/03/29 18:29:22 Nit: this 0 magically matches the enum in renderer
piman 2012/03/29 18:56:47 It wasn't intended to be magic, just the default v
}
SyncChannel::SyncContext::~SyncContext() {
@@ -408,8 +408,8 @@ SyncChannel::SyncChannel(
SyncChannel::~SyncChannel() {
}
-void SyncChannel::SetRestrictDispatchToSameChannel(bool value) {
- sync_context()->set_restrict_dispatch(value);
+void SyncChannel::SetRestrictDispatchChannelGroup(int group) {
+ sync_context()->set_restrict_dispatch_group(group);
}
bool SyncChannel::Send(Message* message) {

Powered by Google App Engine
This is Rietveld 408576698