|
|
Chromium Code Reviews|
Created:
4 years, 6 months ago by Charlie Reis Modified:
4 years, 6 months ago CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org, site-isolation-reviews_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionCache RenderFrameHost's parent so it doesn't change over time.
RenderFrameHost::GetParent() should always return the same value
for a given frame. However, we will soon allow RenderFrameHosts
to continue to exist briefly in the background in a pending
deletion state, such that we can wait for their unload handlers,
PageState, etc. In these cases, the parent FrameTreeNode will
have already moved to a new current RenderFrameHost.
Rather than asking the parent FrameTreeNode, just cache the parent
RenderFrameHost in the child.
BUG=609963
TEST=No behavior change.
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation
Committed: https://crrev.com/dab7c8f09b323e70dbcd457963e84d35276e0cea
Cr-Commit-Position: refs/heads/master@{#401198}
Patch Set 1 #
Total comments: 3
Messages
Total messages: 19 (9 generated)
Description was changed from ========== Cache RenderFrameHost's parent so it doesn't change over time. RenderFrameHost::GetParent() should always return the same value for a given frame. However, we will soon allow RenderFrameHosts to continue to exist briefly in the background in a pending deletion state, such that we can wait for their unload handlers, PageState, etc. In these cases, the parent FrameTreeNode will have already moved to a new current RenderFrameHost. Rather than asking the parent FrameTreeNode, just cache the parent RenderFrameHost in the child. BUG=609963 TEST=No behavior change. ========== to ========== Cache RenderFrameHost's parent so it doesn't change over time. RenderFrameHost::GetParent() should always return the same value for a given frame. However, we will soon allow RenderFrameHosts to continue to exist briefly in the background in a pending deletion state, such that we can wait for their unload handlers, PageState, etc. In these cases, the parent FrameTreeNode will have already moved to a new current RenderFrameHost. Rather than asking the parent FrameTreeNode, just cache the parent RenderFrameHost in the child. BUG=609963 TEST=No behavior change. CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation ==========
creis@chromium.org changed reviewers: + alexmos@chromium.org
Alex, can you take a look? This is another small piece to land before the pending delete FTN CL. Shouldn't be any different today, but it will matter when RFHs can live on after their parent FTN swaps away.
The CQ bit was checked by creis@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2086083003/1
LGTM with one quick question. https://codereview.chromium.org/2086083003/diff/1/content/browser/frame_host/... File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2086083003/diff/1/content/browser/frame_host/... content/browser/frame_host/render_frame_host_impl.cc:263: parent_ = frame_tree_node_->parent()->current_frame_host(); Could this ever be incorrect if we try to create a new child frame in an unload handler? Or is that disallowed? (I realize this will match our old behavior in that case, just curious what should happen.)
dcheng@chromium.org changed reviewers: + dcheng@chromium.org
https://codereview.chromium.org/2086083003/diff/1/content/browser/frame_host/... File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2086083003/diff/1/content/browser/frame_host/... content/browser/frame_host/render_frame_host_impl.cc:263: parent_ = frame_tree_node_->parent()->current_frame_host(); On 2016/06/21 23:36:02, alexmos wrote: > Could this ever be incorrect if we try to create a new child frame in an unload > handler? Or is that disallowed? (I realize this will match our old behavior in > that case, just curious what should happen.) We don't allow frames to be attached in frames that are detaching. Might not be a bad idea to have some enforcement in the browser though.
Thanks! https://codereview.chromium.org/2086083003/diff/1/content/browser/frame_host/... File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2086083003/diff/1/content/browser/frame_host/... content/browser/frame_host/render_frame_host_impl.cc:263: parent_ = frame_tree_node_->parent()->current_frame_host(); On 2016/06/21 23:39:47, dcheng wrote: > On 2016/06/21 23:36:02, alexmos wrote: > > Could this ever be incorrect if we try to create a new child frame in an > unload > > handler? Or is that disallowed? (I realize this will match our old behavior > in > > that case, just curious what should happen.) > > We don't allow frames to be attached in frames that are detaching. Might not be > a bad idea to have some enforcement in the browser though. Yeah, I think that's something we'll want to enforce in the pending delete FTN CL, in case there's a race. For now, it should be safe.
The CQ bit was unchecked by creis@chromium.org
The CQ bit was checked by creis@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2086083003/1
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by creis@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2086083003/1
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Cache RenderFrameHost's parent so it doesn't change over time. RenderFrameHost::GetParent() should always return the same value for a given frame. However, we will soon allow RenderFrameHosts to continue to exist briefly in the background in a pending deletion state, such that we can wait for their unload handlers, PageState, etc. In these cases, the parent FrameTreeNode will have already moved to a new current RenderFrameHost. Rather than asking the parent FrameTreeNode, just cache the parent RenderFrameHost in the child. BUG=609963 TEST=No behavior change. CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation ========== to ========== Cache RenderFrameHost's parent so it doesn't change over time. RenderFrameHost::GetParent() should always return the same value for a given frame. However, we will soon allow RenderFrameHosts to continue to exist briefly in the background in a pending deletion state, such that we can wait for their unload handlers, PageState, etc. In these cases, the parent FrameTreeNode will have already moved to a new current RenderFrameHost. Rather than asking the parent FrameTreeNode, just cache the parent RenderFrameHost in the child. BUG=609963 TEST=No behavior change. CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/dab7c8f09b323e70dbcd457963e84d35276e0cea Cr-Commit-Position: refs/heads/master@{#401198} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/dab7c8f09b323e70dbcd457963e84d35276e0cea Cr-Commit-Position: refs/heads/master@{#401198} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
