DescriptionFix detection of RenderViewHosts pending deletion in CreateRenderViewHost.
Previously, if FrameTree::CreateRenderViewHost found an existing RVH,
it checked whether its main frame is pending deletion to decide that
the RVH shouldn't be reused. This doesn't work when
IsSwappedOutForbidden is true, because the RVH's main frame might have
been cleared by RFHM::CommitPending. Consequently, on A->B->A
navigations, if B->A happened before the swapout ACK was received for
A->B, we ended up reusing RVH(A) for the new navigation, and crashed
trying to create RF(A) because creating main frames with an existing
RenderView and without a proxy to replace isn't supported by the
renderer. In such situations, RVH(A) shouldn't be reused, and this
code introduces a flag on RVH to ensure that this happens even after
the main frame has been cleared.
BUG=515302
Committed: https://crrev.com/b97d6bb6f374d80d432d74ce5c31465fa21209f7
Cr-Commit-Position: refs/heads/master@{#350489}
Patch Set 1 #Patch Set 2 : #Patch Set 3 : Rewrite test #Patch Set 4 : Nits #
Total comments: 10
Patch Set 5 : Nasko's comments #Patch Set 6 : Fix UAFs due to SwapOut timer calling OnSwappedOut in the middle of test. #
Total comments: 2
Patch Set 7 : Tweak test per Nasko's suggestions; fix pending RVH check #
Total comments: 2
Patch Set 8 : Fix Nasko's nit #Patch Set 9 : Fix test timeout on Mac #
Messages
Total messages: 20 (5 generated)
|