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

Issue 782093002: Ensure that before creating proxy of site A, RVH of site A is initialized. (Closed)

Created:
6 years ago by lazyboy
Modified:
5 years, 10 months ago
Reviewers:
Charlie Reis, nasko
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.

Description

Ensure that before creating proxy of site A, RVH of site A is initialized. Imagine we have a frame pointing to oop site A. Now if we kill the process of that frame, the RVH of A goes into a IsRenderViewLive = false state. If we try to navigate another frame to site A now, the RVH in question is not initialized and proxy creation in root() will fail because there's no frame in that RVH. A / B In A-embed-B scenario, killing process B should not destroy the host/browser counter parts, so the Swapped out RFH/RVH and proxy of B in A's |proxy_hosts_| should stay around. This CL makes proxy of B stay around in A's |proxy_hosts_|. Next time we want to navigate a frame to site instance B, it should restore the renderer process by: 1) Making sure we call RFHM::InitRenderView(). 2) Making sure we call RFPH::InitRenderFrameProxy(). To achieve 2), I've added a RFPH::IsRenderFrameProxyLive() which behind the scenes uses a boolean render_frame_proxy_created_ that indicates whether the renderer/ side of the proxy has been created or not. BUG=432107 Test=Load two frames in a page, one pointing to different origin (oop) and one pointing to same origin (local). Kill the process associated with the oop frame. Navigate the same origin frame to the first frame's site instance so that it goes oop. Committed: https://crrev.com/bb1af56567bd6f8724f4415c5151e3f4b0dd63d5 Cr-Commit-Position: refs/heads/master@{#314482}

Patch Set 1 : Force InitRenderView() #

Patch Set 2 : call CreateFrame() if RVH is not live #

Total comments: 1

Patch Set 3 : Create new RVH instead of re-using + Add test #

Total comments: 15

Patch Set 4 : main_frame_routing_id set #

Patch Set 5 : Retry with keeping proxy of B in A around, add IsRenderFrameProxyLive(). #

Patch Set 6 : rebase @tott #

Patch Set 7 : some minor cleanup #

Patch Set 8 : sync @tott #

Patch Set 9 : sync again #

Total comments: 21

Patch Set 10 : Address comments from Nasko. #

Patch Set 11 : Cleaned up test files to load the tree structure directly from html #

Total comments: 7

Patch Set 12 : sync @tott before addressing comments #

Patch Set 13 : Address comments from nasko@ #

Patch Set 14 : Fix RenderFrameHostManagerTest.CleanUpSwappedOutRVHOnProcessCrash #

Total comments: 6

Patch Set 15 : address comments from Nasko #

Patch Set 16 : Add a TODO based on the comment #

Patch Set 17 : sync @tott #

Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -36 lines) Patch
M content/browser/frame_host/frame_tree.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +53 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +13 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_frame_proxy_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +10 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_proxy_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +4 lines, -1 line 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +163 lines, -26 lines 0 comments Download
M content/test/data/frame_tree/page_with_one_frame.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M content/test/data/frame_tree/page_with_two_frames.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -3 lines 0 comments Download
A content/test/data/frame_tree/page_with_two_frames_nested.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (7 generated)
Charlie Reis
Great. Fix looks reasonable to me. Can you add a test to site_per_process_browsertest.cc based on ...
6 years ago (2014-12-10 21:30:24 UTC) #2
Charlie Reis
[Also +site-isolation-reviews@chromium.org]
6 years ago (2014-12-10 21:31:05 UTC) #3
lazyboy
On 2014/12/10 21:30:24, Charlie Reis wrote: > Great. Fix looks reasonable to me. Can you ...
6 years ago (2014-12-10 21:35:10 UTC) #4
lazyboy
New attempt is on patchset #3. https://chromiumcodereview.appspot.com/782093002/diff/20001/content/browser/frame_host/frame_tree.cc File content/browser/frame_host/frame_tree.cc (right): https://chromiumcodereview.appspot.com/782093002/diff/20001/content/browser/frame_host/frame_tree.cc#newcode277 content/browser/frame_host/frame_tree.cc:277: return iter->second; Trying ...
6 years ago (2014-12-11 01:29:48 UTC) #6
Charlie Reis
[+nasko to sanity check] Thanks for the test! I had a second thought about the ...
6 years ago (2014-12-12 19:18:32 UTC) #8
nasko
https://codereview.chromium.org/782093002/diff/60001/content/browser/frame_host/frame_tree.cc File content/browser/frame_host/frame_tree.cc (right): https://codereview.chromium.org/782093002/diff/60001/content/browser/frame_host/frame_tree.cc#newcode208 content/browser/frame_host/frame_tree.cc:208: root()->render_manager()->CreateRenderFrame( On 2014/12/12 19:18:31, Charlie Reis wrote: > I ...
6 years ago (2014-12-12 22:25:01 UTC) #9
lazyboy
I'm answering one major question and uploaded one patchset #4 for you guys to look ...
6 years ago (2014-12-16 07:10:04 UTC) #10
lazyboy
On 2014/12/16 07:10:04, lazyboy wrote: > I'm answering one major question and uploaded one patchset ...
6 years ago (2014-12-16 20:53:01 UTC) #11
lazyboy
I've got the new approach to work. See updated CL description for details. At high ...
6 years ago (2014-12-23 22:03:11 UTC) #12
lazyboy
@Nasko, can you take a look at the CL? Thanks.
5 years, 11 months ago (2015-01-20 18:41:41 UTC) #13
nasko
Overall it looks nice. Mostly nits and one suggestion for improving the test. https://chromiumcodereview.appspot.com/782093002/diff/180001/content/browser/frame_host/frame_tree.cc File ...
5 years, 11 months ago (2015-01-20 23:51:23 UTC) #14
lazyboy
Comments addressed in patchset #10. https://chromiumcodereview.appspot.com/782093002/diff/180001/content/browser/frame_host/frame_tree.cc File content/browser/frame_host/frame_tree.cc (right): https://chromiumcodereview.appspot.com/782093002/diff/180001/content/browser/frame_host/frame_tree.cc#newcode211 content/browser/frame_host/frame_tree.cc:211: } else if (!render_view_host->IsRenderViewLive()) ...
5 years, 11 months ago (2015-01-21 18:52:14 UTC) #15
lazyboy
I've update the CL to specify the tree structure of the test directly in the ...
5 years, 11 months ago (2015-01-22 23:32:35 UTC) #18
lazyboy
On 2015/01/22 23:32:35, lazyboy wrote: > I've update the CL to specify the tree structure ...
5 years, 10 months ago (2015-02-02 20:39:19 UTC) #19
nasko
LGTM with a few nits. https://chromiumcodereview.appspot.com/782093002/diff/260001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://chromiumcodereview.appspot.com/782093002/diff/260001/content/browser/frame_host/render_frame_host_manager.cc#newcode592 content/browser/frame_host/render_frame_host_manager.cc:592: // SwapOut creates a ...
5 years, 10 months ago (2015-02-02 22:47:09 UTC) #20
lazyboy
Comments addressed in patchset #13 https://chromiumcodereview.appspot.com/782093002/diff/260001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://chromiumcodereview.appspot.com/782093002/diff/260001/content/browser/frame_host/render_frame_host_manager.cc#newcode592 content/browser/frame_host/render_frame_host_manager.cc:592: // SwapOut creates a ...
5 years, 10 months ago (2015-02-03 00:22:43 UTC) #21
lazyboy
There are couple of tests failing: 1) TaskManagerOOPIFBrowserTest.KillSubframe/1 2) RenderFrameHostManagerTest.CleanUpSwappedOutRVHOnProcessCrash #1 is a result of ...
5 years, 10 months ago (2015-02-03 21:02:01 UTC) #22
nasko
https://chromiumcodereview.appspot.com/782093002/diff/320001/content/browser/frame_host/render_frame_host_manager_unittest.cc File content/browser/frame_host/render_frame_host_manager_unittest.cc (right): https://chromiumcodereview.appspot.com/782093002/diff/320001/content/browser/frame_host/render_frame_host_manager_unittest.cc#newcode1422 content/browser/frame_host/render_frame_host_manager_unittest.cc:1422: rvh1->GetSiteInstance())->is_render_frame_proxy_live()); Let's split this into two checks: EXPECT_TRUE for ...
5 years, 10 months ago (2015-02-03 21:29:36 UTC) #23
lazyboy
Comments addressed in patchset #15. https://chromiumcodereview.appspot.com/782093002/diff/320001/content/browser/frame_host/render_frame_host_manager_unittest.cc File content/browser/frame_host/render_frame_host_manager_unittest.cc (right): https://chromiumcodereview.appspot.com/782093002/diff/320001/content/browser/frame_host/render_frame_host_manager_unittest.cc#newcode1422 content/browser/frame_host/render_frame_host_manager_unittest.cc:1422: rvh1->GetSiteInstance())->is_render_frame_proxy_live()); On 2015/02/03 21:29:36, ...
5 years, 10 months ago (2015-02-03 23:15:14 UTC) #24
nasko
LGTM again. Just one favor to ask - adding a TODO in the test code. ...
5 years, 10 months ago (2015-02-03 23:39:51 UTC) #25
lazyboy
TODO added in patchset #16 https://chromiumcodereview.appspot.com/782093002/diff/320001/content/browser/frame_host/render_frame_host_manager_unittest.cc File content/browser/frame_host/render_frame_host_manager_unittest.cc (right): https://chromiumcodereview.appspot.com/782093002/diff/320001/content/browser/frame_host/render_frame_host_manager_unittest.cc#newcode1422 content/browser/frame_host/render_frame_host_manager_unittest.cc:1422: rvh1->GetSiteInstance())->is_render_frame_proxy_live()); On 2015/02/03 23:39:50, ...
5 years, 10 months ago (2015-02-03 23:55:42 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/782093002/380001
5 years, 10 months ago (2015-02-04 02:00:45 UTC) #29
commit-bot: I haz the power
Committed patchset #17 (id:380001)
5 years, 10 months ago (2015-02-04 02:36:40 UTC) #30
commit-bot: I haz the power
5 years, 10 months ago (2015-02-04 02:39:04 UTC) #31
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/bb1af56567bd6f8724f4415c5151e3f4b0dd63d5
Cr-Commit-Position: refs/heads/master@{#314482}

Powered by Google App Engine
This is Rietveld 408576698