WebTest: Remove RenderViewHost for main window
A flag to check if a new RenderFrameHost is really new in WebTestControlHost::HandleNewRenderFrameHost(), we check if its RenderViewHost is already contained in |main_window_render_view_hosts_|. This detection is based on our past design that we don't delete RenderViewHosts in a web test, and we don't erase entries of |main_window_render_view_hosts_|. But it can happen if we start to swap RenderFrameHosts and RenderViewHosts with Browsing Instance Swap and/or Back-Forward Cache. After deleting an old RenderViewHost, a new RenderViewHost can be created on the address where the old one was allocated. This address conflict can lead a misjudge of the check of new RenderFrameHosts. This CL handles delete events of RenderViewHosts for main windows on WebTestControlHost, and removes their addresses from the list. Bug: 1136383, 1132180 Change-Id: I442ad67d2207a822dec37fb676d623dd035f0b9d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462997 Commit-Queue: Hitoshi Yoshida <peria@chromium.org> Reviewed-by:Rakina Zata Amni <rakina@chromium.org> Reviewed-by:
danakj <danakj@chromium.org> Reviewed-by:
Fergal Daly <fergal@chromium.org> Cr-Commit-Position: refs/heads/master@{#816630}
Showing
Please register or sign in to comment