summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_views.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.cc b/chrome/browser/renderer_host/render_widget_host_view_views.cc
index d2e55fa7..d980cb4 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_views.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc
@@ -130,8 +130,6 @@ RenderWidgetHostViewViews::RenderWidgetHostViewViews(RenderWidgetHost* host)
}
RenderWidgetHostViewViews::~RenderWidgetHostViewViews() {
- RenderViewGone(base::TERMINATION_STATUS_NORMAL_TERMINATION,
- ResultCodes::NORMAL_EXIT);
}
void RenderWidgetHostViewViews::InitAsChild() {
@@ -293,8 +291,12 @@ void RenderWidgetHostViewViews::RenderViewGone(base::TerminationStatus status,
}
void RenderWidgetHostViewViews::Destroy() {
- // TODO(anicolao): deal with any special popup cleanup
- NOTIMPLEMENTED();
+ // host_'s destruction brought us here, null it out so we don't use it
+ host_ = NULL;
+
+ if (GetParent())
+ GetParent()->RemoveChildView(this);
+ MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
void RenderWidgetHostViewViews::SetTooltipText(const std::wstring& tip) {