summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-01 00:19:24 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-01 00:19:24 +0000
commitdd9ea853b5143e93c0088077962b4f3d69860edf (patch)
treeb1342cae4ee2865ef92d7fe0845d80859702ba1d /ppapi
parentfafe725f5dfb6f97de65c3082294875c28ae53f7 (diff)
downloadchromium_src-dd9ea853b5143e93c0088077962b4f3d69860edf.zip
chromium_src-dd9ea853b5143e93c0088077962b4f3d69860edf.tar.gz
chromium_src-dd9ea853b5143e93c0088077962b4f3d69860edf.tar.bz2
Restore comments about reentrancy in the HostDispatcher::Send function
BUG=none TEST=none Review URL: http://codereview.chromium.org/8095021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/proxy/host_dispatcher.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/ppapi/proxy/host_dispatcher.cc b/ppapi/proxy/host_dispatcher.cc
index 26a1c15..91a3759 100644
--- a/ppapi/proxy/host_dispatcher.cc
+++ b/ppapi/proxy/host_dispatcher.cc
@@ -137,9 +137,15 @@ bool HostDispatcher::Send(IPC::Message* msg) {
// Prevent the dispatcher from going away during the call. Scenarios
// where this could happen include a Send for a sync message which while
// waiting for the reply, dispatches an incoming ExecuteScript call which
- // destroys the plugin module and in turn the dispatcher,
+ // destroys the plugin module and in turn the dispatcher.
ScopedModuleReference ref(this);
+ // Normal sync messages are set to unblock, which would normally cause the
+ // plugin to be reentered to process them. We only want to do this when we
+ // know the plugin is in a state to accept reentrancy. Since the plugin side
+ // never clears this flag on messages it sends, we can't get deadlock, but we
+ // may still get reentrancy in the host as a result.
+
if (!allow_plugin_reentrancy_)
msg->set_unblock(false);
return Dispatcher::Send(msg);