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

Issue 2857213005: PlzNavigate: implement process reuse for ServiceWorkers (Closed)

Created:
3 years, 7 months ago by clamy
Modified:
3 years, 7 months ago
Reviewers:
Charlie Reis, nasko
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, serviceworker-reviews, creis+watch_chromium.org, shimazu+serviceworker_chromium.org, nasko+codewatch_chromium.org, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, ajwong+watch_chromium.org, horo+watch_chromium.org, kinuko+watch, tzik, blink-worker-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

PlzNavigate: implement process reuse for ServiceWorkers This Cl implements a new ProcessReusePolicy, REUSE_CHECKING_FRAMES_AND_NAVIGATIONS to use when creating SiteInstances for ServiceWorkers in PlzNavigate. When this policy is used, we will try to reuse a RenderProcessHost that is hosting a frame for the site, or that is expecting a navigation to the site. See https://docs.google.com/a/chromium.org/document/d/1Zujvf5jcUtm1hyh-xhXYlyfPjdO2oEplz22fOhSj660/edit?usp=sharing for the background behing this change. BUG=705318 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2857213005 Cr-Commit-Position: refs/heads/master@{#474395} Committed: https://chromium.googlesource.com/chromium/src/+/5d947f5a0c60d33fa16b6609978bd712a497cb00

Patch Set 1 #

Total comments: 54

Patch Set 2 : Rebase #

Patch Set 3 : Addressed comments #

Patch Set 4 : Added unit tests #

Patch Set 5 : Rebase #

Patch Set 6 : Fixed compilation error #

Total comments: 17

Patch Set 7 : Fixed tests #

Patch Set 8 : Rebase #

Patch Set 9 : Addressed comments #

Patch Set 10 : Fix compilation error #

Total comments: 25

Patch Set 11 : Rebase #

Patch Set 12 : Addressed comments #

Total comments: 2

Patch Set 13 : Rebase + addressed comments #

Patch Set 14 : Added unit tests for site url changes #

Patch Set 15 : Removed wrong CleanupNavigation call #

Total comments: 15

Patch Set 16 : Addressed comments + fixed tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+808 lines, -7 lines) Patch
M content/browser/frame_host/navigation_handle_impl.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +20 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +66 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_request.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 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 1 chunk +11 lines, -3 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 2 chunks +9 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 3 chunks +37 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 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 6 7 8 2 chunks +25 lines, -0 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 13 14 15 4 chunks +227 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +395 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_process_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +8 lines, -2 lines 0 comments Download
M content/browser/site_instance_impl.h View 1 2 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 75 (52 generated)
clamy
@nasko, creis: PTAL. This is a first draft of what the process reuse policy for ...
3 years, 7 months ago (2017-05-04 16:01:01 UTC) #6
Charlie Reis
Thanks. I'm going to need more time reviewing this one.
3 years, 7 months ago (2017-05-05 00:03:43 UTC) #9
nasko
https://codereview.chromium.org/2857213005/diff/1/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/2857213005/diff/1/content/browser/frame_host/navigation_handle_impl.cc#newcode622 content/browser/frame_host/navigation_handle_impl.cc:622: speculative_render_process_host_id_ = kInvalidRenderProcessHostId; Shouldn't speculative_render_process_host_id_ be cleared in both ...
3 years, 7 months ago (2017-05-05 05:22:00 UTC) #10
clamy
Thanks! A few answers below (I don't have time for a new patchset before going ...
3 years, 7 months ago (2017-05-05 15:10:11 UTC) #11
Charlie Reis
Ok! I've had some time to think through this, and I've got a few suggestions ...
3 years, 7 months ago (2017-05-15 03:41:51 UTC) #12
clamy
On 2017/05/15 03:41:51, Charlie Reis wrote: > Ok! I've had some time to think through ...
3 years, 7 months ago (2017-05-15 15:20:48 UTC) #13
clamy
https://codereview.chromium.org/2857213005/diff/1/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/2857213005/diff/1/content/browser/frame_host/navigation_handle_impl.cc#newcode622 content/browser/frame_host/navigation_handle_impl.cc:622: speculative_render_process_host_id_ = kInvalidRenderProcessHostId; On 2017/05/15 03:41:52, Charlie Reis wrote: ...
3 years, 7 months ago (2017-05-15 15:21:15 UTC) #14
Charlie Reis
Thanks! A few more thoughts below. https://codereview.chromium.org/2857213005/diff/1/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/2857213005/diff/1/content/browser/frame_host/navigation_handle_impl.cc#newcode622 content/browser/frame_host/navigation_handle_impl.cc:622: speculative_render_process_host_id_ = kInvalidRenderProcessHostId; ...
3 years, 7 months ago (2017-05-15 23:46:18 UTC) #15
clamy
Thanks! I have a new patch set up and I am working on adding unit ...
3 years, 7 months ago (2017-05-16 14:50:46 UTC) #18
Charlie Reis
Thanks! This is looking good. I want to do another deep pass to make sure ...
3 years, 7 months ago (2017-05-18 00:58:35 UTC) #33
clamy
Thanks! I have uploaded a new patch set that also fixes the test issues. https://codereview.chromium.org/2857213005/diff/100001/content/browser/frame_host/navigation_handle_impl.cc ...
3 years, 7 months ago (2017-05-22 16:59:52 UTC) #44
Charlie Reis
Great! Mostly looks good with nits, with a few additional questions below. Also, the case ...
3 years, 7 months ago (2017-05-23 07:29:12 UTC) #45
clamy
Thanks! Yes I don't really know how to proceed with the hosted app case. I ...
3 years, 7 months ago (2017-05-23 13:41:15 UTC) #50
Charlie Reis
Thanks for the fixes! I think one of my earlier questions might have fallen between ...
3 years, 7 months ago (2017-05-24 04:50:54 UTC) #51
clamy
Thanks! I have added a check mechanism to ensure that RPH ids are not left ...
3 years, 7 months ago (2017-05-24 14:44:28 UTC) #58
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/2857213005/280001
3 years, 7 months ago (2017-05-24 14:45:07 UTC) #61
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/301905)
3 years, 7 months ago (2017-05-24 15:37:10 UTC) #63
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/2857213005/280001
3 years, 7 months ago (2017-05-24 15:40:08 UTC) #65
Charlie Reis
Great! I'm glad we caught that bug, and I feel much better with the hosted ...
3 years, 7 months ago (2017-05-24 17:18:37 UTC) #66
commit-bot: I haz the power
Try jobs failed on following builders: linux_site_isolation on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_site_isolation/builds/8135)
3 years, 7 months ago (2017-05-24 17:49:06 UTC) #68
clamy
Thanks! https://codereview.chromium.org/2857213005/diff/280001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/2857213005/diff/280001/content/browser/frame_host/render_frame_host_manager.cc#newcode486 content/browser/frame_host/render_frame_host_manager.cc:486: if (IsBrowserSideNavigationEnabled()) { On 2017/05/24 17:18:37, Charlie Reis ...
3 years, 7 months ago (2017-05-24 18:03:04 UTC) #69
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/2857213005/300001
3 years, 7 months ago (2017-05-24 18:04:17 UTC) #72
commit-bot: I haz the power
3 years, 7 months ago (2017-05-24 19:51:37 UTC) #75
Message was sent while issue was closed.
Committed patchset #16 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/5d947f5a0c60d33fa16b6609978b...

Powered by Google App Engine
This is Rietveld 408576698