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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 647613002: Fix RenderWidgetHostViewGuest leak. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add content_unittests Created 6 years, 2 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/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 95c44a36eab102bade3fca9e181afd677755d6fc..02694717eae351cbed28c90bed256e7ddfac7cc7 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1744,7 +1744,10 @@ void RenderWidgetHostViewAura::OnWindowDestroying(aura::Window* window) {
}
void RenderWidgetHostViewAura::OnWindowDestroyed(aura::Window* window) {
- host_->ViewDestroyed();
+ // Ask the RWH to drop reference to us.
sky 2014/10/13 17:04:13 This comment isn't helpful. It doesn't describe wh
lazyboy 2014/10/13 21:54:01 I've added comment explaining when GetView() != th
+ if (host_->GetView() == this)
+ host_->ViewDestroyed();
+
delete this;
}
« no previous file with comments | « content/browser/renderer_host/DEPS ('k') | content/browser/renderer_host/render_widget_host_view_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698