Commit 3dab6e44 authored by danakj's avatar danakj Committed by Commit Bot

Check that mainframes don't fail to be swapped out.

When this fails the proxy is deleted but the RenderFrame of the
speculative frame would be left in a shutting down state would not
delete the RenderFrame in the renderer.

R=dcheng@chromium.org

Bug: 939262
Change-Id: I38947b3471a2ba510d59f6132d286376473ba787
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1529165Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#642111}
parent 4230b400
......@@ -2330,10 +2330,14 @@ void RenderFrameImpl::OnSwapOut(
// This executes the unload handlers on this frame and its local descendants.
bool success = frame_->Swap(proxy->web_frame());
// For main frames, the swap should have cleared the RenderView's pointer to
// this frame.
if (is_main_frame)
if (is_main_frame) {
// TODO(crbug.com/939262): Looking for ways a main frame could be left in a
// provisional state and not deleted by the browser.
CHECK(success);
// For main frames, the swap should have cleared the RenderView's pointer to
// this frame.
CHECK(!render_view->main_render_frame_);
}
if (!success) {
// The swap can fail when the frame is detached during swap (this can
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment