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

Issue 2861433002: Implement ProcessReusePolicy for SiteInstances (Closed)

Created:
3 years, 7 months ago by clamy
Modified:
3 years, 7 months ago
Reviewers:
Charlie Reis, nasko
CC:
chromium-reviews, creis+watch_chromium.org, posciak+watch_chromium.org, chfremer+watch_chromium.org, nasko+codewatch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, ajwong+watch_chromium.org, xjz+watch_chromium.org, miu+watch_chromium.org, ncarter (slow)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement ProcessReusePolicy for SiteInstances This CL is the first step in an effort to add new policies for reusing processes when creating SiteInstances. It adds a ProcessReusePolicy that defines the rules for reusing processes, and which is used by RenderProcessHostImpl when attempting to create a RenderProcessHost for the SiteInstance. As a side-effect, the code for creating a RPH has been moved from SiteInstanceImpl::GetProcess to a static method in RenderProcessHostImpl. See https://docs.google.com/a/chromium.org/document/d/1Zujvf5jcUtm1hyh-xhXYlyfPjdO2oEplz22fOhSj660/edit?usp=sharing for the motivation behind this change. BUG=705318 Review-Url: https://codereview.chromium.org/2861433002 Cr-Commit-Position: refs/heads/master@{#470740} Committed: https://chromium.googlesource.com/chromium/src/+/63960c37c94873829b5937bf512809800f6eef6a

Patch Set 1 #

Patch Set 2 : Updated comments #

Patch Set 3 : Rebase #

Total comments: 40

Patch Set 4 : Addressed comments #

Patch Set 5 : Rebase #

Patch Set 6 : Reverted default subframe process code #

Patch Set 7 : Fixed ChromeOS issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -145 lines) Patch
M content/browser/browsing_instance.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/media/session/audio_focus_manager_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 4 chunks +22 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 chunks +127 lines, -0 lines 0 comments Download
M content/browser/site_instance_impl.h View 1 2 3 4 chunks +29 lines, -15 lines 0 comments Download
M content/browser/site_instance_impl.cc View 1 2 3 4 5 6 7 chunks +23 lines, -120 lines 0 comments Download
M content/browser/site_instance_impl_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/test/test_render_view_host_factory.cc View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 35 (24 generated)
clamy
@creis, nasko: PTAL. This is what I had in mind for the process reuse policy ...
3 years, 7 months ago (2017-05-02 16:58:47 UTC) #4
Charlie Reis
On 2017/05/02 16:58:47, clamy wrote: > @creis, nasko: PTAL. This is what I had in ...
3 years, 7 months ago (2017-05-03 01:47:29 UTC) #7
Charlie Reis
Thanks! A few thoughts below, but nothing major. https://codereview.chromium.org/2861433002/diff/40001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/2861433002/diff/40001/content/browser/renderer_host/render_process_host_impl.cc#newcode2792 content/browser/renderer_host/render_process_host_impl.cc:2792: const ...
3 years, 7 months ago (2017-05-03 23:28:00 UTC) #16
nasko
https://codereview.chromium.org/2861433002/diff/40001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/2861433002/diff/40001/content/browser/renderer_host/render_process_host_impl.cc#newcode478 content/browser/renderer_host/render_process_host_impl.cc:478: host->SetIsNeverSuitableForReuse(); What about different GuestView instances that share a ...
3 years, 7 months ago (2017-05-03 23:46:17 UTC) #17
clamy
Thanks! For the record, I have uploaded a first draft of the change for ServiceWorkers ...
3 years, 7 months ago (2017-05-04 15:56:19 UTC) #22
Charlie Reis
Great. I think this is almost ready, except that I'd recommend not doing the is_for_guests_only ...
3 years, 7 months ago (2017-05-04 23:12:23 UTC) #23
nasko
https://codereview.chromium.org/2861433002/diff/40001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/2861433002/diff/40001/content/browser/renderer_host/render_process_host_impl.cc#newcode3165 content/browser/renderer_host/render_process_host_impl.cc:3165: bool is_for_guests_only) { On 2017/05/04 23:12:23, Charlie Reis wrote: ...
3 years, 7 months ago (2017-05-05 05:27:23 UTC) #24
clamy
Thanks! I've come back to the original default subframe process code. I have also fixed ...
3 years, 7 months ago (2017-05-05 16:56:06 UTC) #27
Charlie Reis
Thanks! LGTM.
3 years, 7 months ago (2017-05-10 20:29:21 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2861433002/120001
3 years, 7 months ago (2017-05-10 20:34:58 UTC) #32
commit-bot: I haz the power
3 years, 7 months ago (2017-05-10 22:57:21 UTC) #35
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/63960c37c94873829b5937bf5128...

Powered by Google App Engine
This is Rietveld 408576698