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

Unified Diff: chrome/plugin/plugin_channel_base.cc

Issue 399043: Only clears the unblock flag on sync IPCs during other sync dispatches (Closed)
Patch Set: Created 11 years, 1 month 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 | « chrome/plugin/plugin_channel_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/plugin_channel_base.cc
diff --git a/chrome/plugin/plugin_channel_base.cc b/chrome/plugin/plugin_channel_base.cc
index e9969196132d74127a53e4ca785c12d48a8ed11a..f4bcac93881a94d3d650ce671aca5f29120bb5ba 100644
--- a/chrome/plugin/plugin_channel_base.cc
+++ b/chrome/plugin/plugin_channel_base.cc
@@ -60,8 +60,8 @@ PluginChannelBase::PluginChannelBase()
peer_pid_(0),
in_remove_route_(false),
channel_valid_(false),
- in_dispatch_(0),
- send_unblocking_only_during_dispatch_(false) {
+ in_sync_dispatch_(0),
+ send_unblocking_only_during_sync_dispatch_(false) {
}
PluginChannelBase::~PluginChannelBase() {
@@ -100,7 +100,7 @@ bool PluginChannelBase::Send(IPC::Message* message) {
return false;
}
- if (send_unblocking_only_during_dispatch_ && in_dispatch_ == 0 &&
+ if (send_unblocking_only_during_sync_dispatch_ && in_sync_dispatch_ == 0 &&
message->is_sync()) {
message->set_unblock(false);
}
@@ -117,7 +117,8 @@ void PluginChannelBase::OnMessageReceived(const IPC::Message& message) {
// ourself so that we can send the reply and decrement back in_dispatch_.
scoped_refptr<PluginChannelBase> me(this);
- in_dispatch_++;
+ if (message.is_sync())
+ in_sync_dispatch_++;
if (message.routing_id() == MSG_ROUTING_CONTROL) {
OnControlMessageReceived(message);
} else {
@@ -130,7 +131,8 @@ void PluginChannelBase::OnMessageReceived(const IPC::Message& message) {
Send(reply);
}
}
- in_dispatch_--;
+ if (message.is_sync())
jam 2009/11/17 21:09:01 can't use message here since it's already deleted,
jam 2009/11/17 21:11:13 argh, i didn't mean that. nvm!!
+ in_sync_dispatch_--;
}
void PluginChannelBase::OnChannelConnected(int32 peer_pid) {
@@ -214,6 +216,6 @@ void PluginChannelBase::OnChannelError() {
channel_valid_ = false;
}
-void PluginChannelBase::SendUnblockingOnlyDuringDispatch() {
- send_unblocking_only_during_dispatch_ = true;
+void PluginChannelBase::SendUnblockingOnlyDuringSyncDispatch() {
jam 2009/11/17 21:09:01 since you're changing this, mind moving it to the
+ send_unblocking_only_during_sync_dispatch_ = true;
}
« no previous file with comments | « chrome/plugin/plugin_channel_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698