Commit 508434a4 authored by carlosk's avatar carlosk Committed by Commit bot

PlzNavigate: improve tracking of improper subframe swap-out.

Upon a FrameTreeNode destruction a speculative RenderFrameHost might
be swapped-out instead of being destroyed along with the node. This
behavior differs from the current navigation implementation and was
causing a leak of a RenderFrameProxyHost.

This change adds a CHECK to stop the leak the same way
RenderFrameHostManager::SwapOutOldFrame does.

BUG=439423

Review URL: https://codereview.chromium.org/1066823004

Cr-Commit-Position: refs/heads/master@{#327044}
parent 2d816075
...@@ -663,6 +663,7 @@ void RenderFrameHostManager::DiscardUnusedFrame( ...@@ -663,6 +663,7 @@ void RenderFrameHostManager::DiscardUnusedFrame(
// Any currently suspended navigations are no longer needed. // Any currently suspended navigations are no longer needed.
render_frame_host->CancelSuspendedNavigations(); render_frame_host->CancelSuspendedNavigations();
CHECK(!GetRenderFrameProxyHost(site_instance));
RenderFrameProxyHost* proxy = RenderFrameProxyHost* proxy =
new RenderFrameProxyHost(site_instance, frame_tree_node_); new RenderFrameProxyHost(site_instance, frame_tree_node_);
proxy_hosts_[site_instance->GetId()] = proxy; proxy_hosts_[site_instance->GetId()] = proxy;
......
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