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

Issue 536063002: Clean up RenderWidgetHostView destruction (Closed)

Created:
6 years, 3 months ago by ccameron
Modified:
6 years, 2 months ago
Reviewers:
piman
CC:
chromium-reviews, creis+watch_chromium.org, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, nasko+codewatch_chromium.org, jam, penghuang+watch_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, James Su
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Clean up RenderWidgetHostView destruction There are multiple instances where we call SetView(NULL) on a RWHImpl, but never invalidate the back-pointer in the now-dangling RWHView. Address this with the following changes - change where RWHImpl::view_ is set to NULL to call Destroy on the view_ - require all instances of RWHView to call RWHImpl::ViewDestroyed - make SetView(NULL) be an invalid call Make the view being destroyed be an argument to ViewDestroyed, because there are many transient times that a view thinks it is a RWHImpl's view, but is not anymore (probably worth fixing, but that's a long string to pull on). Remove the function RWHView::RenderProcessGone because in all implementations, it called RWHView::Destroy anyway, sometimes with some acrobatics to fix issues related to SetView(NULL) being called, which is now gone. BUG=404828

Patch Set 1 #

Patch Set 2 : Fix typo #

Patch Set 3 : New version #

Patch Set 4 : Fix DCHECK #

Patch Set 5 : Safer scheme #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -83 lines) Patch
M content/browser/frame_host/render_widget_host_view_child_frame.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 3 4 1 chunk +2 lines, -9 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.h View 1 2 3 2 chunks +0 lines, -5 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 2 3 4 2 chunks +3 lines, -17 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 chunks +16 lines, -9 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 1 chunk +1 line, -7 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 3 chunks +3 lines, -7 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 3 chunks +2 lines, -6 lines 0 comments Download
M content/test/test_render_view_host.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M content/test/test_render_view_host.cc View 1 2 3 4 2 chunks +1 line, -5 lines 0 comments Download

Messages

Total messages: 1 (1 generated)
ccameron
6 years, 3 months ago (2014-09-03 19:29:58 UTC) #1

Powered by Google App Engine
This is Rietveld 408576698