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

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

Issue 536063002: Clean up RenderWidgetHostView destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Safer scheme Created 6 years, 3 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 a54d860bc9e646cb9c5d0c9b52559e8042e2f17f..c1e2c881c27eee5a1273b8bf84b47e365a9dbb4e 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -864,13 +864,8 @@ void RenderWidgetHostViewAura::ImeCompositionRangeChanged(
composition_character_bounds_ = character_bounds;
}
-void RenderWidgetHostViewAura::RenderProcessGone(base::TerminationStatus status,
- int error_code) {
- UpdateCursorIfOverSelf();
- Destroy();
-}
-
void RenderWidgetHostViewAura::Destroy() {
+ UpdateCursorIfOverSelf();
// Beware, this function is not called on all destruction paths. It will
// implicitly end up calling ~RenderWidgetHostViewAura though, so all
// destruction/cleanup code should happen there, not here.
@@ -1679,7 +1674,6 @@ void RenderWidgetHostViewAura::OnWindowDestroying(aura::Window* window) {
}
void RenderWidgetHostViewAura::OnWindowDestroyed(aura::Window* window) {
- host_->ViewDestroyed();
delete this;
}
@@ -2128,6 +2122,8 @@ void RenderWidgetHostViewAura::OnHostMoved(const aura::WindowTreeHost* host,
// RenderWidgetHostViewAura, private:
RenderWidgetHostViewAura::~RenderWidgetHostViewAura() {
+ host_->ViewDestroyed(this);
+
if (touch_editing_client_)
touch_editing_client_->OnViewDestroyed();

Powered by Google App Engine
This is Rietveld 408576698