summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/npobject_stub.h
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_stub.h
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_stub.h')
-rw-r--r--chrome/plugin/npobject_stub.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/plugin/npobject_stub.h b/chrome/plugin/npobject_stub.h
index 653a400..cd75853 100644
--- a/chrome/plugin/npobject_stub.h
+++ b/chrome/plugin/npobject_stub.h
@@ -13,6 +13,10 @@
#include "base/ref_counted.h"
#include "chrome/common/ipc_channel.h"
+namespace base {
+class WaitableEvent;
+}
+
class PluginChannelBase;
class WebPluginDelegateProxy;
struct NPIdentifier_Param;
@@ -25,7 +29,10 @@ struct NPVariant_Param;
class NPObjectStub : public IPC::Channel::Listener,
public IPC::Message::Sender {
public:
- NPObjectStub(NPObject* npobject, PluginChannelBase* channel, int route_id);
+ NPObjectStub(NPObject* npobject,
+ PluginChannelBase* channel,
+ int route_id,
+ base::WaitableEvent* modal_dialog_event);
~NPObjectStub();
// IPC::Message::Sender implementation:
@@ -74,6 +81,8 @@ class NPObjectStub : public IPC::Channel::Listener,
int route_id_;
scoped_refptr<PluginChannelBase> channel_;
+ base::WaitableEvent* modal_dialog_event_;
+
// These variables are used to ensure that the window script object is not
// called after the plugin widget has gone away, as the frame manually
// deallocates it and ignores the refcount to avoid leaks.