DescriptionClean 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 #Messages
Total messages: 1 (1 generated)
|