diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-18 16:05:27 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-18 16:05:27 +0000 |
commit | f273ee50e186599776257df046426c4819ced317 (patch) | |
tree | 3d92b6f8d7702658e40db41531c7c9dd623ec7c7 /android_webview/native | |
parent | d6fa88f5c6c8e835260bb05db880b463ea941626 (diff) | |
download | chromium_src-f273ee50e186599776257df046426c4819ced317.zip chromium_src-f273ee50e186599776257df046426c4819ced317.tar.gz chromium_src-f273ee50e186599776257df046426c4819ced317.tar.bz2 |
Call WebContentsObserver::RenderViewDeleted on the RVH and possibly pending RVH when WebContents is destructed.
Currently this doesn't happen because these RVHs get destructed in RenderViewHostManager's destruction, which happens after WCO::WebContentsImplDestroyed is called. That call removes the observers from WC.
Destructing RVHM before the observers isn't practical because a lot of observers assumes they can call WC::GetRenderViewHost in their destructors. So instead, expliclity call out RenderViewDeleted.
This is needed because many of the use cases of RenderViewHostObserver is to watch for the destruction of a RenderViewHost, so this will make it less error-prone to switch to a WebContentsObserver.
BUG=306569
R=avi@chromium.org, benm@chromium.org
Review URL: https://codereview.chromium.org/27545010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229429 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/native')
-rw-r--r-- | android_webview/native/aw_contents_io_thread_client_impl.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/android_webview/native/aw_contents_io_thread_client_impl.cc b/android_webview/native/aw_contents_io_thread_client_impl.cc index 4c64db2..0cd9f20 100644 --- a/android_webview/native/aw_contents_io_thread_client_impl.cc +++ b/android_webview/native/aw_contents_io_thread_client_impl.cc @@ -148,8 +148,6 @@ void ClientMapEntryUpdater::RenderViewDeleted(RenderViewHost* rvh) { } void ClientMapEntryUpdater::WebContentsDestroyed(WebContents* web_contents) { - if (web_contents->GetRenderViewHost()) - RenderViewDeleted(web_contents->GetRenderViewHost()); delete this; } |