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

Unified Diff: webkit/plugins/ppapi/plugin_object.cc

Issue 8098001: Fix a crash in the renderer process which occurs in the PPAPI host code due to the underlying plugin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 | « ppapi/proxy/host_dispatcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/plugin_object.cc
===================================================================
--- webkit/plugins/ppapi/plugin_object.cc (revision 103325)
+++ webkit/plugins/ppapi/plugin_object.cc (working copy)
@@ -77,6 +77,13 @@
PPVarArrayFromNPVariantArray args(accessor.object()->instance(),
argc, argv);
+ // For the OOP plugin case we need to grab a reference on the plugin module
+ // object to ensure that it is not destroyed courtsey an incoming
+ // ExecuteScript call which destroys the plugin module and in turn the
+ // dispatcher.
+ scoped_refptr<webkit::ppapi::PluginModule> ref(
+ accessor.object()->instance()->module());
+
return result_converter.SetResult(accessor.object()->ppp_class()->Call(
accessor.object()->ppp_class_data(), accessor.identifier(),
argc, args.array(), result_converter.exception()));
@@ -91,6 +98,13 @@
PPVarArrayFromNPVariantArray args(obj->instance(), argc, argv);
PPResultAndExceptionToNPResult result_converter(obj->GetNPObject(), result);
+ // For the OOP plugin case we need to grab a reference on the plugin module
+ // object to ensure that it is not destroyed courtsey an incoming
+ // ExecuteScript call which destroys the plugin module and in turn the
+ // dispatcher.
+ scoped_refptr<webkit::ppapi::PluginModule> ref(
+ obj->instance()->module());
+
result_converter.SetResult(obj->ppp_class()->Call(
obj->ppp_class_data(), PP_MakeUndefined(), argc, args.array(),
result_converter.exception()));
« no previous file with comments | « ppapi/proxy/host_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698