Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc |
=================================================================== |
--- webkit/plugins/ppapi/ppapi_plugin_instance.cc (revision 149708) |
+++ webkit/plugins/ppapi/ppapi_plugin_instance.cc (working copy) |
@@ -315,6 +315,7 @@ |
: delegate_(delegate), |
module_(module), |
instance_interface_(instance_interface), |
+ nacl_plugin_instance_interface_(NULL), |
dmichael (off chromium)
2012/08/03 02:42:05
nit: I don't usually explicitly initialize scoped_
bbudge
2012/08/03 17:51:20
Done.
|
pp_instance_(0), |
container_(NULL), |
full_frame_(false), |
@@ -403,6 +404,8 @@ |
// destructor of the instance object tries to use the instance. |
message_channel_->SetPassthroughObject(NULL); |
instance_interface_->DidDestroy(pp_instance()); |
+ if (nacl_plugin_instance_interface_.get()) |
+ nacl_plugin_instance_interface_->DidDestroy(pp_instance()); |
if (fullscreen_container_) { |
fullscreen_container_->Destroy(); |
@@ -2135,6 +2138,11 @@ |
} |
bool PluginInstance::ResetAsProxied() { |
+ // Remember the existing instance interface, so we can call DidDestroy in |
+ // our Delete() method. This will delete the NaCl plugin instance, which |
+ // will shut down the NaCl process. |
+ nacl_plugin_instance_interface_.reset(instance_interface_.release()); |
+ |
base::Callback<const void*(const char*)> get_plugin_interface_func = |
base::Bind(&PluginModule::GetPluginInterface, module_.get()); |
PPP_Instance_Combined* ppp_instance_combined = |