diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-08 23:28:52 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-08 23:28:52 +0000 |
commit | 257b11401565658f9ec8ecda8b2b4a5890e278e1 (patch) | |
tree | 0c72598b92478e6bc6fbee4e4d3b0c82a22d9a4b /chrome/plugin/npobject_stub.cc | |
parent | ac1819a70675204a0682ebf99f56513e23655c30 (diff) | |
download | chromium_src-257b11401565658f9ec8ecda8b2b4a5890e278e1.zip chromium_src-257b11401565658f9ec8ecda8b2b4a5890e278e1.tar.gz chromium_src-257b11401565658f9ec8ecda8b2b4a5890e278e1.tar.bz2 |
This fixes http://code.google.com/p/chromium/issues/detail?id=2472, which
is an issue with popups displayed by the flash plugin in response to a user
click, getting blocked.
The plugin invokes NPN_Evaluate to execute the javascript. It also invokes
the NPN_PushPopupEnabledState/NPN_PopupEnabledState API's to set the popup
enabled stack for the duration of the call.
The fix is to add the plumbing in NPN_Evaluate to pass in a flag indicating
whether popups are allowed for the duration of the call.
Bug=2472
Review URL: http://codereview.chromium.org/6562
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3074 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/npobject_stub.cc')
-rw-r--r-- | chrome/plugin/npobject_stub.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/plugin/npobject_stub.cc b/chrome/plugin/npobject_stub.cc index 80f6356..ec276b0 100644 --- a/chrome/plugin/npobject_stub.cc +++ b/chrome/plugin/npobject_stub.cc @@ -260,6 +260,7 @@ void NPObjectStub::OnEnumeration(std::vector<NPIdentifier_Param>* value, } void NPObjectStub::OnEvaluate(const std::string& script, + bool popups_allowed, IPC::Message* reply_msg) { if (IsPluginProcess()) { NOTREACHED() << "Should only be called on NPObjects in the renderer"; @@ -277,7 +278,8 @@ void NPObjectStub::OnEvaluate(const std::string& script, script_string.UTF8Characters = script.c_str(); script_string.UTF8Length = static_cast<unsigned int>(script.length()); - bool return_value = NPN_Evaluate(0, npobject_, &script_string, &result_var); + bool return_value = NPN_EvaluateHelper(0, popups_allowed, npobject_, + &script_string, &result_var); NPVariant_Param result_param; CreateNPVariantParam(result_var, local_channel, &result_param, true); |