android: Fix ContentViewCore and RenderWidgetHostViewAndroid lifetime issue
https://codereview.chromium.org/26753005/ might have introduced crashes that trace to SetContentViewCore. That previous patch assumed that ContentViewCore (CVC) always outlives its associated RenderWidgetHostView. In this patch, we are trying to ensure that the RWHVA pointer to CVC is nulled when CVC is destroyed. Note the following: - WebContents owns ContentViewCore and WebContentsView. - CVC and WebContentsView are implicitly destroyed (no direct call to clean-up code). So ContentViewCore cannot refer to WebContents or WebContentsView in its destructor. Therefore, we use the observer of when WebContents is destroyed to start the clean up on CVC. BUG=335165, 324341 Review URL: https://codereview.chromium.org/133073012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247878 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment