Index: content/renderer/pepper/pepper_webplugin_impl.cc |
diff --git a/content/renderer/pepper/pepper_webplugin_impl.cc b/content/renderer/pepper/pepper_webplugin_impl.cc |
index 25b96337996d6b0704e3a1822aad1ff16334469c..cccc20e6cc35f3f6030d887c3129f41e594fbc3e 100644 |
--- a/content/renderer/pepper/pepper_webplugin_impl.cc |
+++ b/content/renderer/pepper/pepper_webplugin_impl.cc |
@@ -63,8 +63,8 @@ PepperWebPluginImpl::PepperWebPluginImpl( |
scoped_ptr<PluginInstanceThrottlerImpl> throttler) |
: init_data_(new InitData()), |
full_frame_(params.loadManually), |
- throttler_(throttler.Pass()), |
instance_object_(PP_MakeUndefined()), |
+ throttler_(throttler.Pass()), |
container_(NULL) { |
DCHECK(plugin_module); |
init_data_->module = plugin_module; |
@@ -124,6 +124,8 @@ void PepperWebPluginImpl::destroy() { |
// Tell |container_| to clear references to this plugin's script objects. |
if (container_) |
container_->clearScriptObjects(); |
+ container_ = nullptr; |
+ throttler_.reset(); |
if (instance_.get()) { |
ppapi::PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(instance_object_); |