summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/npobject_util.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-21 08:10:29 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-21 08:10:29 +0000
commitb62de6b223ad59c0183fb0890f27121c7d24d852 (patch)
tree92787f54447c363052070044c7033f56c62e262f /chrome/plugin/npobject_util.cc
parent8930d471c128ed74b11beaa78ea1b171c1ac7157 (diff)
downloadchromium_src-b62de6b223ad59c0183fb0890f27121c7d24d852.zip
chromium_src-b62de6b223ad59c0183fb0890f27121c7d24d852.tar.gz
chromium_src-b62de6b223ad59c0183fb0890f27121c7d24d852.tar.bz2
Fix plugin hang that Earth team found.
Normally an NPObjectProxy uses the modal dialog event to figure out when it needs to pump window messages in an invoke. However, an NPObjectProxy created by an NPObjectStub never got access to this event, which led to this hang. BUG=7793 Review URL: http://codereview.chromium.org/20515 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/npobject_util.cc')
-rw-r--r--chrome/plugin/npobject_util.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/plugin/npobject_util.cc b/chrome/plugin/npobject_util.cc
index e3ba520..7bed9b4 100644
--- a/chrome/plugin/npobject_util.cc
+++ b/chrome/plugin/npobject_util.cc
@@ -139,7 +139,8 @@ NPIdentifier CreateNPIdentifier(const NPIdentifier_Param& param) {
void CreateNPVariantParam(const NPVariant& variant,
PluginChannelBase* channel,
NPVariant_Param* param,
- bool release) {
+ bool release,
+ base::WaitableEvent* modal_dialog_event) {
switch (variant.type) {
case NPVariantType_Void:
param->type = NPVARIANT_PARAM_VOID;
@@ -184,7 +185,7 @@ void CreateNPVariantParam(const NPVariant& variant,
param->type = NPVARIANT_PARAM_OBJECT_ROUTING_ID;
int route_id = channel->GenerateRouteID();
NPObjectStub* object_stub = new NPObjectStub(
- variant.value.objectValue, channel, route_id);
+ variant.value.objectValue, channel, route_id, modal_dialog_event);
param->npobject_routing_id = route_id;
param->npobject_pointer = variant.value.objectValue;
} else {