summaryrefslogtreecommitdiffstats
path: root/webkit/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/plugins')
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc4
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 0d81fa9..e5b8ccc 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -349,6 +349,7 @@ PluginInstance::PluginInstance(PluginDelegate* delegate,
plugin_find_interface_(NULL),
plugin_messaging_interface_(NULL),
plugin_pdf_interface_(NULL),
+ plugin_private_interface_(NULL),
plugin_selection_interface_(NULL),
plugin_zoom_interface_(NULL),
checked_for_plugin_messaging_interface_(false),
@@ -754,6 +755,9 @@ void PluginInstance::HandleMessage(PP_Var message) {
}
PP_Var PluginInstance::GetInstanceObject() {
+ // Keep a reference on the stack. See NOTE above.
+ scoped_refptr<PluginInstance> ref(this);
+
// Try the private interface first. If it is not supported, we fall back to
// the primary PPP_Instance interface.
// TODO(dmichael): Remove support for PPP_Instance.GetInstanceObject
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.h b/webkit/plugins/ppapi/ppapi_plugin_instance.h
index c36419e..b893fc3 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.h
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h
@@ -355,8 +355,8 @@ class PluginInstance : public base::RefCounted<PluginInstance> {
const PPP_Find_Dev* plugin_find_interface_;
const PPP_Messaging* plugin_messaging_interface_;
const PPP_Pdf* plugin_pdf_interface_;
- const PPP_Selection_Dev* plugin_selection_interface_;
const PPP_Instance_Private* plugin_private_interface_;
+ const PPP_Selection_Dev* plugin_selection_interface_;
const PPP_Zoom_Dev* plugin_zoom_interface_;
// A flag to indicate whether we have asked this plugin instance for its