commit | 381e7e18ae54cfa591119949603c7863b3595da4 | [log] [tgz] |
---|---|---|
author | Alexander Timin <[email protected]> | Tue Apr 28 19:04:03 2020 |
committer | Commit Bot <[email protected]> | Tue Apr 28 19:04:03 2020 |
tree | 56c4e781ad86131301296f367f0286db528000fa | |
parent | 47b585135b4aef66b96cd6e2ffa577b1eaadbbeb [diff] [blame] |
[content] Make FrameTreeNode::parent return RenderFrameHostImpl*. As child FrameTreeNodes are now owned by RenderFrameHost, make parent() return RenderFrameHostImpl* because the parent RenderFrameHost cannot change for the lifetime of the FrameTreeNode. This makes our handling of non-current (pending deletion, bfcache) frames more robust by making harder to refer to a frame which is not your parent. [email protected],[email protected],[email protected] CC=,[email protected] BUG=1073269 Change-Id: Ic2661b69ddd09e1cc5d9095caf7f158fa31f4189 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2160970 Commit-Queue: Alexander Timin <[email protected]> Reviewed-by: Alex Moshchuk <[email protected]> Reviewed-by: Charlie Reis <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Cr-Commit-Position: refs/heads/master@{#763470}
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc index e100a06..3f773354 100644 --- a/content/browser/frame_host/navigation_controller_impl.cc +++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -425,7 +425,7 @@ // sandboxed frame's subtree by walking up the tree looking for the // sandboxed frame. for (auto* frame = item->frame_tree_node(); frame; - frame = frame->parent()) { + frame = FrameTreeNode::From(frame->parent())) { if (frame->frame_tree_node_id() == sandbox_frame_tree_node_id) { within_subtree = true; break;