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

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

Issue 9564024: Re-land http://codereview.chromium.org/9403039/, r124106 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary change to ppapi_uitest.cc timer_ Created 8 years, 9 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 | « webkit/plugins/ppapi/npobject_var.h ('k') | webkit/plugins/ppapi/ppapi_webplugin_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index e4c13c4f6b278dceb3e862369c6c136050f02612..3135a3c282f4dca03a6b2b1177e7e0cdf0519f18 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -358,6 +358,11 @@ PluginInstance::~PluginInstance() {
void PluginInstance::Delete() {
// Keep a reference on the stack. See NOTE above.
scoped_refptr<PluginInstance> ref(this);
+ // Force the MessageChannel to release its "passthrough object" which should
+ // release our last reference to the "InstanceObject" and will probably
+ // destroy it. We want to do this prior to calling DidDestroy in case the
+ // destructor of the instance object tries to use the instance.
+ message_channel_->SetPassthroughObject(NULL);
instance_interface_->DidDestroy(pp_instance());
if (fullscreen_container_) {
« no previous file with comments | « webkit/plugins/ppapi/npobject_var.h ('k') | webkit/plugins/ppapi/ppapi_webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698