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

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 133233012: BrowserPlugin: Cleanup ChildFrameCompositingHelper and fix lifetime issue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reupload Created 6 years, 11 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/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index 4168e2e0f335a60982bd9a47e74eee9f019e3de9..c4cfa2faee067b2ed67a7436e8b66df5e8d3ac3b 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -917,10 +917,7 @@ void BrowserPlugin::EnableCompositing(bool enable) {
if (!compositing_helper_.get()) {
compositing_helper_ =
ChildFrameCompositingHelper::CreateCompositingHelperForBrowserPlugin(
- container_,
- browser_plugin_manager(),
- guest_instance_id_,
- render_view_routing_id_);
+ weak_ptr_factory_.GetWeakPtr());
}
} else {
if (paint_ack_received_) {
@@ -953,9 +950,9 @@ void BrowserPlugin::destroy() {
// The BrowserPlugin's WebPluginContainer is deleted immediately after this
// call returns, so let's not keep a reference to it around.
g_plugin_container_map.Get().erase(container_);
- container_ = NULL;
if (compositing_helper_.get())
compositing_helper_->OnContainerDestroy();
+ container_ = NULL;
// Will be a no-op if the mouse is not currently locked.
if (render_view_.get())
render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(this);

Powered by Google App Engine
This is Rietveld 408576698