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

Unified Diff: content/renderer/pepper/pepper_webplugin_impl.cc

Issue 1141793002: Reland: Fix WebViewPlugin::scheduleAnimation crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
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_);

Powered by Google App Engine
This is Rietveld 408576698