summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-08 04:21:30 +0000
committerpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-08 04:21:30 +0000
commitbd65a3dadac5b3b1127d37bcc78e9e3f009b664c (patch)
tree775061a5f1cb14b370e58c39682a54b02d3a5e92
parent54af05f8ea8050e0ab93dbcc940ac4e1bc4068e5 (diff)
downloadchromium_src-bd65a3dadac5b3b1127d37bcc78e9e3f009b664c.zip
chromium_src-bd65a3dadac5b3b1127d37bcc78e9e3f009b664c.tar.gz
chromium_src-bd65a3dadac5b3b1127d37bcc78e9e3f009b664c.tar.bz2
Allow re-entrancy in PPB_Flash::Navigate()
BUG=chromium-os:13912 TEST=pandora.com Review URL: http://codereview.chromium.org/6814034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80893 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ppapi/proxy/ppb_flash_proxy.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/ppapi/proxy/ppb_flash_proxy.cc b/ppapi/proxy/ppb_flash_proxy.cc
index 0c8acba..6e3fcd6 100644
--- a/ppapi/proxy/ppb_flash_proxy.cc
+++ b/ppapi/proxy/ppb_flash_proxy.cc
@@ -10,6 +10,7 @@
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/private/ppb_flash.h"
+#include "ppapi/proxy/host_dispatcher.h"
#include "ppapi/proxy/plugin_dispatcher.h"
#include "ppapi/proxy/plugin_resource.h"
#include "ppapi/proxy/ppapi_messages.h"
@@ -221,6 +222,13 @@ void PPB_Flash_Proxy::OnMsgNavigate(const HostResource& request_info,
const std::string& target,
bool from_user_action,
int32_t* result) {
+ DCHECK(!dispatcher()->IsPlugin());
+ // We need to allow re-entrancy here, because this may call into Javascript
+ // (e.g. with a "javascript:" URL), or do things like navigate away from the
+ // page, either one of which will need to re-enter into the plugin.
+ // It is safe, because it is essentially equivalent to NPN_GetURL, where Flash
+ // would expect re-entrancy. When running in-process, it does re-enter here.
+ static_cast<HostDispatcher*>(dispatcher())->set_allow_plugin_reentrancy();
*result = ppb_flash_target()->Navigate(request_info.host_resource(),
target.c_str(),
from_user_action);