From e8a9a859b57c604d4b4995fc32bb34656a8d31c7 Mon Sep 17 00:00:00 2001 From: "dmichael@chromium.org" Date: Tue, 19 Apr 2011 21:37:16 +0000 Subject: Fix a couple of glaring omissions when I added PPP_Instance_Private. BUG=None Test=None Review URL: http://codereview.chromium.org/6883055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82163 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/plugins/ppapi/ppapi_plugin_instance.cc | 4 ++++ webkit/plugins/ppapi/ppapi_plugin_instance.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'webkit/plugins') 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 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 { 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 -- cgit v1.1