Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7984)

Unified Diff: chrome/plugin/npobject_stub.cc

Issue 20515: Fix plugin hang that Earth team found.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/plugin/npobject_stub.h ('k') | chrome/plugin/npobject_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/npobject_stub.cc
===================================================================
--- chrome/plugin/npobject_stub.cc (revision 10079)
+++ chrome/plugin/npobject_stub.cc (working copy)
@@ -12,12 +12,16 @@
#include "third_party/npapi/bindings/npruntime.h"
NPObjectStub::NPObjectStub(
- NPObject* npobject, PluginChannelBase* channel, int route_id)
+ NPObject* npobject,
+ PluginChannelBase* channel,
+ int route_id,
+ base::WaitableEvent* modal_dialog_event)
: channel_(channel),
npobject_(npobject),
route_id_(route_id),
valid_(true),
- web_plugin_delegate_proxy_(NULL) {
+ web_plugin_delegate_proxy_(NULL),
+ modal_dialog_event_(modal_dialog_event) {
channel_->AddRoute(route_id, this, true);
// We retain the object just as PluginHost does if everything was in-process.
@@ -110,8 +114,10 @@
int arg_count = static_cast<int>(args.size());
NPVariant* args_var = new NPVariant[arg_count];
- for (int i = 0; i < arg_count; ++i)
- CreateNPVariant(args[i], local_channel, &(args_var[i]), NULL);
+ for (int i = 0; i < arg_count; ++i) {
+ CreateNPVariant(
+ args[i], local_channel, &(args_var[i]), modal_dialog_event_);
+ }
if (is_default) {
if (IsPluginProcess()) {
@@ -145,7 +151,8 @@
delete[] args_var;
- CreateNPVariantParam(result_var, local_channel, &result_param, true);
+ CreateNPVariantParam(
+ result_var, local_channel, &result_param, true, modal_dialog_event_);
NPObjectMsg_Invoke::WriteReplyParams(reply_msg, result_param, return_value);
local_channel->Send(reply_msg);
}
@@ -181,7 +188,8 @@
*result = NPN_GetProperty(0, npobject_, id, &result_var);
}
- CreateNPVariantParam(result_var, channel_, property, true);
+ CreateNPVariantParam(
+ result_var, channel_, property, true, modal_dialog_event_);
}
void NPObjectStub::OnSetProperty(const NPIdentifier_Param& name,
@@ -191,7 +199,7 @@
VOID_TO_NPVARIANT(result_var);
NPIdentifier id = CreateNPIdentifier(name);
NPVariant property_var;
- CreateNPVariant(property, channel_, &property_var, NULL);
+ CreateNPVariant(property, channel_, &property_var, modal_dialog_event_);
if (IsPluginProcess()) {
if (npobject_->_class->setProperty) {
@@ -282,7 +290,8 @@
&script_string, &result_var);
NPVariant_Param result_param;
- CreateNPVariantParam(result_var, local_channel, &result_param, true);
+ CreateNPVariantParam(
+ result_var, local_channel, &result_param, true, modal_dialog_event_);
NPObjectMsg_Evaluate::WriteReplyParams(reply_msg, result_param, return_value);
local_channel->Send(reply_msg);
}
« no previous file with comments | « chrome/plugin/npobject_stub.h ('k') | chrome/plugin/npobject_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698