diff options
author | vrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-02 00:05:45 +0000 |
---|---|---|
committer | vrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-02 00:05:45 +0000 |
commit | 4352b1e4f410bdd2afbea510f2087c557c34cf58 (patch) | |
tree | 5cbd764f99169e4c71118e7c32e0645d9c0cdfee /ppapi | |
parent | 07540ecda8aeb80805f81f425765e20c4bea7111 (diff) | |
download | chromium_src-4352b1e4f410bdd2afbea510f2087c557c34cf58.zip chromium_src-4352b1e4f410bdd2afbea510f2087c557c34cf58.tar.gz chromium_src-4352b1e4f410bdd2afbea510f2087c557c34cf58.tar.bz2 |
Allow reentrancy for HostDispatcher::GetProxiedInterface
By allowing reentrancy in this function, we allow a PPB implementation to call
GetPluginInterface from the constructor. Otherwise the renderer process hangs.
(See PPB_VideoDecoder_Impl's constructor as an example.)
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/7540032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95010 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/proxy/host_dispatcher.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ppapi/proxy/host_dispatcher.cc b/ppapi/proxy/host_dispatcher.cc index 1137a54..82b353e 100644 --- a/ppapi/proxy/host_dispatcher.cc +++ b/ppapi/proxy/host_dispatcher.cc @@ -211,7 +211,12 @@ const void* HostDispatcher::GetProxiedInterface(const std::string& interface) { if (iter == plugin_if_supported_.end()) { // Need to query. Cache the result so we only do this once. bool supported = false; + + bool previous_reentrancy_value = allow_plugin_reentrancy_; + allow_plugin_reentrancy_ = true; Send(new PpapiMsg_SupportsInterface(interface, &supported)); + allow_plugin_reentrancy_ = previous_reentrancy_value; + std::pair<PluginIFSupportedMap::iterator, bool> iter_success_pair; iter_success_pair = plugin_if_supported_.insert( PluginIFSupportedMap::value_type(interface, supported)); @@ -271,4 +276,3 @@ ScopedModuleReference::~ScopedModuleReference() { } // namespace proxy } // namespace pp - |