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

Issue 1797363002: "Top Document Isolation" mode (Closed)

Created:
4 years, 9 months ago by ncarter (slow)
Modified:
4 years, 8 months ago
CC:
asvitkine+watch_chromium.org, blink-worker-reviews_chromium.org, brettw, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dominicc (has gone to gerrit), Xi Han, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+watch, kinuko+serviceworker, loading-reviews_chromium.org, michaeln, nasko+codewatch_chromium.org, nhiroki, ojan, serviceworker-reviews, tzik, Xiaocheng
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce --top-document-isolation mode, a new process model wherein the top document is process separated from its subframes when possible, but the subframes are all housed in a single renderer process. Currently this mode only shares the subframe process within a browsing instance: usually, that will mean sharing the subframe process within a tab. In follow up patches we can extend the sharing so that we might share subframe RenderProcessHosts among unrelated BrowsingInstances, when legal. BUG=594217 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/d5bbd0b067cf0c1c8e40c7b5c2d1a1a39c0db10f Cr-Commit-Position: refs/heads/master@{#384364}

Patch Set 1 #

Patch Set 2 : Add browser tests #

Patch Set 3 : Rebased #

Patch Set 4 : Two new browsertests. #

Total comments: 11

Patch Set 5 : New version that doesn't look at SiteURL #

Patch Set 6 : Add Xiaocheng's test (without fixes) #

Patch Set 7 : Fix assertions in xiaocheng's test. It has reasonable behavior now. #

Patch Set 8 : Self review fixes. #

Patch Set 9 : histograms.xml #

Patch Set 10 : Add missing override #

Total comments: 62

Patch Set 11 : Reviewer fixes #

Patch Set 12 : Wrap ExecuteScript in ASSERT_TRUE #

Patch Set 13 : Fix up tests. Necessary rebase to obtain browsertest util behavior change. #

Total comments: 9

Patch Set 14 : Reviewer fixes. #

Patch Set 15 : One does not simply mark SiteInstanceImpl as final #

Patch Set 16 : Whitespace. #

Patch Set 17 : merge #

Patch Set 18 : scoped_refptr in GetDefaultSubframeSiteInstance #

Patch Set 19 : Actually save browsing_instance.h #

Patch Set 20 : Remove lame comment. #

Patch Set 21 : SiteInstanceImpl #

Patch Set 22 : Suppress tests under --site-per-process #

Unified diffs Side-by-side diffs Delta from patch set Stats (+823 lines, -78 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +11 lines, -1 line 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +6 lines, -5 lines 0 comments Download
M content/browser/browsing_instance.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/browsing_instance.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +26 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigator_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +8 lines, -7 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 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 +1 line, -1 line 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 12 13 14 15 16 4 chunks +17 lines, -8 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 13 14 15 16 17 18 19 10 chunks +115 lines, -46 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/site_instance_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +20 lines, -0 lines 0 comments Download
M content/browser/site_instance_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +11 lines, -5 lines 0 comments Download
A content/browser/top_document_isolation_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +571 lines, -0 lines 0 comments Download
M content/common/site_isolation_policy.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M content/common/site_isolation_policy.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +12 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -0 lines 0 comments Download
M content/test/content_browser_test_utils_internal.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -2 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 64 (28 generated)
ncarter (slow)
Input welcome from all. creis/nasko: This is still somewhat rough around the edges, but it ...
4 years, 9 months ago (2016-03-15 22:52:50 UTC) #3
Xiaocheng
Question: in the same BrowsingInstance, is it allowed to split the frames of the same ...
4 years, 9 months ago (2016-03-16 08:03:32 UTC) #5
ncarter (slow)
On 2016/03/16 08:03:32, Xiaocheng wrote: > Question: in the same BrowsingInstance, is it allowed to ...
4 years, 9 months ago (2016-03-16 18:58:27 UTC) #6
Xiaocheng
On 2016/03/16 at 18:58:27, nick wrote: > On 2016/03/16 08:03:32, Xiaocheng wrote: > > Question: ...
4 years, 9 months ago (2016-03-17 10:07:34 UTC) #7
Charlie Reis
Sorry to chime in late-- it's been a busy week. Looks like you all are ...
4 years, 9 months ago (2016-03-17 19:38:33 UTC) #8
Charlie Reis
My comments below are to see if we can explore the other approach I suggested, ...
4 years, 9 months ago (2016-03-18 21:15:13 UTC) #9
ncarter (slow)
On 2016/03/18 21:15:13, Charlie Reis wrote: > My comments below are to see if we ...
4 years, 9 months ago (2016-03-18 21:30:15 UTC) #10
Xiaocheng
I edited Charlie's document with a new case but haven't received any response. Sorry that ...
4 years, 9 months ago (2016-03-22 04:35:04 UTC) #12
ncarter (slow)
There are a couple TODOs still, but this is ready for another look from reviewers. ...
4 years, 9 months ago (2016-03-24 23:02:19 UTC) #13
Xiaocheng
non-committer's l-g-t-m with nits. https://codereview.chromium.org/1797363002/diff/180001/content/browser/isolate_top_document_browsertest.cc File content/browser/isolate_top_document_browsertest.cc (right): https://codereview.chromium.org/1797363002/diff/180001/content/browser/isolate_top_document_browsertest.cc#newcode338 content/browser/isolate_top_document_browsertest.cc:338: // TODO(nick): These subframes ought ...
4 years, 9 months ago (2016-03-25 08:30:52 UTC) #14
Charlie Reis
Very nice! I like the small delta from our current behavior and the effect that ...
4 years, 9 months ago (2016-03-25 19:47:11 UTC) #15
ncarter (slow)
https://codereview.chromium.org/1797363002/diff/180001/content/browser/browsing_instance.cc File content/browser/browsing_instance.cc (right): https://codereview.chromium.org/1797363002/diff/180001/content/browser/browsing_instance.cc#newcode47 content/browser/browsing_instance.cc:47: SiteInstance* BrowsingInstance::GetDefaultSubframeSiteInstance() { On 2016/03/25 19:47:12, Charlie Reis wrote: ...
4 years, 8 months ago (2016-03-28 22:00:29 UTC) #17
dcheng
Two random drive-bys. https://codereview.chromium.org/1797363002/diff/240001/content/browser/browsing_instance.cc File content/browser/browsing_instance.cc (right): https://codereview.chromium.org/1797363002/diff/240001/content/browser/browsing_instance.cc#newcode63 content/browser/browsing_instance.cc:63: DCHECK(static_cast<SiteInstanceImpl*>(site_instance) Unrelated to this CL, but ...
4 years, 8 months ago (2016-03-29 08:09:16 UTC) #18
ncarter (slow)
https://codereview.chromium.org/1797363002/diff/240001/content/browser/browsing_instance.cc File content/browser/browsing_instance.cc (right): https://codereview.chromium.org/1797363002/diff/240001/content/browser/browsing_instance.cc#newcode63 content/browser/browsing_instance.cc:63: DCHECK(static_cast<SiteInstanceImpl*>(site_instance) On 2016/03/29 08:09:16, dcheng wrote: > Unrelated to ...
4 years, 8 months ago (2016-03-29 16:28:33 UTC) #19
dcheng
https://codereview.chromium.org/1797363002/diff/240001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/1797363002/diff/240001/content/browser/frame_host/render_frame_host_manager.cc#newcode1186 content/browser/frame_host/render_frame_host_manager.cc:1186: // different than our current SiteInstance), so that it ...
4 years, 8 months ago (2016-03-29 17:06:59 UTC) #21
Charlie Reis
LGTM! https://codereview.chromium.org/1797363002/diff/180001/content/browser/browsing_instance.cc File content/browser/browsing_instance.cc (right): https://codereview.chromium.org/1797363002/diff/180001/content/browser/browsing_instance.cc#newcode47 content/browser/browsing_instance.cc:47: SiteInstance* BrowsingInstance::GetDefaultSubframeSiteInstance() { On 2016/03/28 22:00:28, ncarter wrote: ...
4 years, 8 months ago (2016-03-29 17:17:13 UTC) #22
ncarter (slow)
dcheng/creis: all done brettw: could you approve for chrome/ ? https://codereview.chromium.org/1797363002/diff/240001/content/browser/browsing_instance.cc File content/browser/browsing_instance.cc (right): https://codereview.chromium.org/1797363002/diff/240001/content/browser/browsing_instance.cc#newcode63 ...
4 years, 8 months ago (2016-03-29 23:30:57 UTC) #23
ncarter (slow)
+asvitkine for histograms.xml brettw -- I goofed, and don't actually need your approval (but would, ...
4 years, 8 months ago (2016-03-29 23:34:26 UTC) #25
Alexei Svitkine (slow)
Have you considered defining this using a base::Feature? Among other advantages, it allows you to ...
4 years, 8 months ago (2016-03-30 15:31:13 UTC) #26
ncarter (slow)
On 2016/03/30 15:31:13, Alexei Svitkine wrote: > Have you considered defining this using a base::Feature? ...
4 years, 8 months ago (2016-03-30 17:32:47 UTC) #27
Alexei Svitkine (slow)
lgtm
4 years, 8 months ago (2016-03-30 18:10:38 UTC) #28
Alexei Svitkine (slow)
Ah, in that case it's fine for it to be separate since it will be ...
4 years, 8 months ago (2016-03-30 18:10:59 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1797363002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1797363002/300001
4 years, 8 months ago (2016-03-30 18:41:03 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/162138) linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 8 months ago (2016-03-30 18:45:42 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1797363002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1797363002/320001
4 years, 8 months ago (2016-03-30 18:52:32 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1797363002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1797363002/340001
4 years, 8 months ago (2016-03-30 20:07:01 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1797363002/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1797363002/380001
4 years, 8 months ago (2016-03-30 20:16:26 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_android on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/42517)
4 years, 8 months ago (2016-03-30 20:28:59 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1797363002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1797363002/400001
4 years, 8 months ago (2016-03-30 21:07:12 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/204125)
4 years, 8 months ago (2016-03-30 22:14:54 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1797363002/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1797363002/420001
4 years, 8 months ago (2016-03-31 17:10:41 UTC) #55
ncarter (slow)
I've suppressed the browsertests when --site-per-process is enabled, and put this back in the CQ. ...
4 years, 8 months ago (2016-03-31 17:11:22 UTC) #56
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_rel/builds/43455)
4 years, 8 months ago (2016-03-31 17:35:11 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1797363002/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1797363002/420001
4 years, 8 months ago (2016-03-31 17:54:38 UTC) #60
commit-bot: I haz the power
Committed patchset #22 (id:420001)
4 years, 8 months ago (2016-03-31 19:53:01 UTC) #62
commit-bot: I haz the power
4 years, 8 months ago (2016-03-31 19:54:08 UTC) #64
Message was sent while issue was closed.
Patchset 22 (id:??) landed as
https://crrev.com/d5bbd0b067cf0c1c8e40c7b5c2d1a1a39c0db10f
Cr-Commit-Position: refs/heads/master@{#384364}

Powered by Google App Engine
This is Rietveld 408576698