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

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

Issue 1141793002: Reland: Fix WebViewPlugin::scheduleAnimation crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix style nit 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_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index cbd809571cc44a960d421552e0cff978a63c3ee1..576f7a00246f92e9ed385814a53e96623e864f6c 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -670,6 +670,13 @@ void PepperPluginInstanceImpl::Delete() {
// Keep a reference on the stack. See NOTE above.
scoped_refptr<PepperPluginInstanceImpl> ref(this);
+
+ // It is important to destroy the throttler before anything else.
+ // The plugin instance may flush its graphics pipeline during its postmortem
+ // spasm, causing the throttler to engage and obtain new dangling reference
+ // to the plugin container being destroyed.
+ throttler_.reset();
+
// 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/pepper/pepper_webplugin_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698