Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Issue 1312643002: Plumb opener information when creating RenderFrames and RenderFrameProxies for subframes. (Closed)

Created:
5 years, 4 months ago by alexmos
Modified:
5 years, 3 months ago
Reviewers:
Charlie Reis, nasko
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@opener-CreateOpenerProxiesIfNeeded
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Plumb opener information when creating RenderFrames and RenderFrameProxies for subframes. Frame opener updates (via window.open) make it possible for subframes to have an opener. Currently, when a subframe gains an opener, this will be forwarded to the browser process and all of the renderer processes where the subframe has a RenderFrame or a RenderFrameProxy. Openers are also supposed to be preserved across cross-process frame navigations. Currently, this is done correctly for top-level frames (where opener information is sent as part of ViewMsg_New), but not for subframes: FrameMsg_NewFrame and FrameMsg_NewFrameProxy currently don't pass any information about the frame's opener. For example, suppose a frame F1 has two subframes, F2 and F3, all at site A. Suppose F1 executes a window.open('',F2_name) to update F2's opener to F1. Now suppose F2 navigates to B. F2's frame in B should have an opener that points to F1's proxy in B, but currently that's not the case. Likewise, suppose F3 navigates to C. F2's proxy in C should have an opener that points to F1's proxy in C. This CL plumbs opener information through FrameMsg_NewFrame(Proxy) to make these scenarios work correctly. BUG=225940 Committed: https://crrev.com/a181efc0fa9b899a2a1f3a69053a1adb0b8683c1 Cr-Commit-Position: refs/heads/master@{#347072}

Patch Set 1 #

Patch Set 2 : Add NewFrameProxy plumbing and test #

Total comments: 9

Patch Set 3 : Rebase #

Patch Set 4 : Charlie's comments #

Patch Set 5 : Resolve conflict with Daniel's CL #

Total comments: 2

Patch Set 6 : Rebase and fix arg order in CreateRenderFrame #

Total comments: 2

Patch Set 7 : Fix param ordering in RenderThreadImpl::OnCreateNewFrameProxy #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -62 lines) Patch
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 1 chunk +4 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 2 chunks +6 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.h View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 5 6 3 chunks +16 lines, -10 lines 0 comments Download
M content/browser/frame_host/render_frame_proxy_host.cc View 1 2 3 1 chunk +8 lines, -1 line 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 1 chunk +146 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 1 chunk +6 lines, -4 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 1 chunk +5 lines, -4 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 3 chunks +16 lines, -8 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 1 chunk +10 lines, -7 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl_browsertest.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M content/renderer/render_frame_proxy.h View 1 2 3 1 chunk +7 lines, -5 lines 0 comments Download
M content/renderer/render_frame_proxy.cc View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 1 chunk +7 lines, -5 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M content/test/data/post_message.html View 1 1 chunk +6 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 19 (8 generated)
alexmos
Charlie, please take a look at this when you have a chance. This is hopefully ...
5 years, 3 months ago (2015-08-26 16:42:32 UTC) #2
Charlie Reis
Nice. LGTM with nits. Sorry for the delay! https://codereview.chromium.org/1312643002/diff/20001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1312643002/diff/20001/content/browser/frame_host/render_frame_host_impl.cc#newcode604 content/browser/frame_host/render_frame_host_impl.cc:604: int ...
5 years, 3 months ago (2015-08-28 23:27:38 UTC) #3
alexmos
+nick for the cross_site_iframe_factory question below. https://codereview.chromium.org/1312643002/diff/20001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1312643002/diff/20001/content/browser/frame_host/render_frame_host_impl.cc#newcode604 content/browser/frame_host/render_frame_host_impl.cc:604: int opener_routing_id) { ...
5 years, 3 months ago (2015-08-31 23:54:28 UTC) #5
alexmos
Nasko, could you please review the IPC changes?
5 years, 3 months ago (2015-08-31 23:55:08 UTC) #7
Charlie Reis
LGTM https://codereview.chromium.org/1312643002/diff/20001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1312643002/diff/20001/content/browser/frame_host/render_frame_host_impl.cc#newcode622 content/browser/frame_host/render_frame_host_impl.cc:622: params.opener_routing_id = opener_routing_id; On 2015/08/31 23:54:28, alexmos wrote: ...
5 years, 3 months ago (2015-09-01 22:04:26 UTC) #8
alexmos
Thanks for reviewing! https://codereview.chromium.org/1312643002/diff/20001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1312643002/diff/20001/content/browser/frame_host/render_frame_host_impl.cc#newcode622 content/browser/frame_host/render_frame_host_impl.cc:622: params.opener_routing_id = opener_routing_id; On 2015/09/01 22:04:26, ...
5 years, 3 months ago (2015-09-01 23:51:02 UTC) #9
nasko
LGTM once parameter order is fixed. https://codereview.chromium.org/1312643002/diff/100001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/1312643002/diff/100001/content/renderer/render_thread_impl.cc#newcode1636 content/renderer/render_thread_impl.cc:1636: int render_view_routing_id, This ...
5 years, 3 months ago (2015-09-02 17:27:45 UTC) #11
alexmos
https://codereview.chromium.org/1312643002/diff/100001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/1312643002/diff/100001/content/renderer/render_thread_impl.cc#newcode1636 content/renderer/render_thread_impl.cc:1636: int render_view_routing_id, On 2015/09/02 17:27:44, nasko (slow to review) ...
5 years, 3 months ago (2015-09-02 22:41:19 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1312643002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1312643002/120001
5 years, 3 months ago (2015-09-03 00:31:32 UTC) #17
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 3 months ago (2015-09-03 00:39:12 UTC) #18
commit-bot: I haz the power
5 years, 3 months ago (2015-09-03 00:39:44 UTC) #19
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/a181efc0fa9b899a2a1f3a69053a1adb0b8683c1
Cr-Commit-Position: refs/heads/master@{#347072}

Powered by Google App Engine
This is Rietveld 408576698