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

Issue 443593002: ServiceWorker: Move worker candidate process knowledge to ServiceWorkerProcessManager. (Closed)

Created:
6 years, 4 months ago by xiang
Modified:
6 years, 3 months ago
CC:
chromium-reviews, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, alecflett+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

ServiceWorker: Move worker candidate process knowledge to ServiceWorkerProcessManager. Before this CL: Candidate processes info is saved in EmbeddedWorkerInstance, when a new worker instance is created for a same scope, the info will be absent for the new worker. E.g., periodic update will spawn a new process every time. After this CL: Candidate processes info will be saved in ServiceWorkerProcessManager key by registration scope. Then different versions with the same scope could share this info. BUG=399982 TEST=content_unittests --gtest_filter=ServiceWorker* Committed: https://crrev.com/3c4d6ceb7f29eaa4024bfe268e033a2ea296066b Cr-Commit-Position: refs/heads/master@{#294113}

Patch Set 1 #

Total comments: 8

Patch Set 2 : review update and rebase CL #

Patch Set 3 : RPH observer DCHECK and browser tests build fix #

Total comments: 24

Patch Set 4 : #

Total comments: 8

Patch Set 5 : remove all pending stuff, rebase #

Patch Set 6 : still need pending patterns #

Patch Set 7 : #

Patch Set 8 : rebase #

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+354 lines, -361 lines) Patch
M content/browser/service_worker/embedded_worker_instance.h View 1 2 3 5 chunks +0 lines, -16 lines 0 comments Download
M content/browser/service_worker/embedded_worker_instance.cc View 1 2 3 4 5 6 7 4 chunks +1 line, -41 lines 0 comments Download
M content/browser/service_worker/embedded_worker_instance_unittest.cc View 1 2 3 3 chunks +8 lines, -45 lines 0 comments Download
M content/browser/service_worker/embedded_worker_test_helper.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/embedded_worker_test_helper.cc View 1 2 3 1 chunk +4 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_browsertest.cc View 1 2 3 4 chunks +12 lines, -12 lines 0 comments Download
M content/browser/service_worker/service_worker_context_core.h View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_context_core.cc View 1 2 3 3 chunks +4 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_context_unittest.cc View 1 2 3 10 chunks +0 lines, -10 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_handle_unittest.cc View 1 2 3 4 2 chunks +3 lines, -4 lines 0 comments Download
M content/browser/service_worker/service_worker_job_coordinator.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_job_coordinator.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_job_unittest.cc View 1 2 3 4 25 chunks +25 lines, -25 lines 0 comments Download
M content/browser/service_worker/service_worker_process_manager.h View 1 2 3 6 chunks +30 lines, -8 lines 0 comments Download
M content/browser/service_worker/service_worker_process_manager.cc View 1 2 3 5 chunks +98 lines, -12 lines 0 comments Download
A content/browser/service_worker/service_worker_process_manager_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +56 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.h View 1 2 3 4 5 6 3 chunks +9 lines, -7 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.cc View 1 2 3 4 5 6 6 chunks +43 lines, -46 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host_unittest.cc View 1 2 3 5 chunks +29 lines, -30 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job.h View 1 2 3 4 2 chunks +5 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job.cc View 1 2 3 4 6 2 chunks +6 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 2 3 2 chunks +4 lines, -17 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 4 5 6 7 5 chunks +2 lines, -28 lines 0 comments Download
M content/browser/service_worker/service_worker_version_unittest.cc View 1 2 3 4 chunks +7 lines, -27 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 32 (5 generated)
xiang
With CL we can avoid spawning unnecessary process for worker for a same scope. PTAL, ...
6 years, 4 months ago (2014-08-05 06:04:53 UTC) #1
falken
+jyasskin
6 years, 4 months ago (2014-08-05 06:40:19 UTC) #2
dominicc (has gone to gerrit)
Some comments inline. (Informal review; I am not OWNERs.) https://codereview.chromium.org/443593002/diff/1/content/browser/service_worker/service_worker_handle_unittest.cc File content/browser/service_worker/service_worker_handle_unittest.cc (right): https://codereview.chromium.org/443593002/diff/1/content/browser/service_worker/service_worker_handle_unittest.cc#newcode49 content/browser/service_worker/service_worker_handle_unittest.cc:49: ...
6 years, 4 months ago (2014-08-06 06:48:18 UTC) #3
michaeln
jeffrey, can you take a look at this one?
6 years, 4 months ago (2014-08-08 00:18:39 UTC) #4
dominicc (has gone to gerrit)
Xiang, can you rebase this patch to HEAD? It looks like some bots couldn't apply ...
6 years, 4 months ago (2014-08-11 01:41:50 UTC) #5
xiang
dominicc@ Thanks for the review! I have rebased and updated the CL. https://codereview.chromium.org/443593002/diff/1/content/browser/service_worker/service_worker_handle_unittest.cc File content/browser/service_worker/service_worker_handle_unittest.cc ...
6 years, 4 months ago (2014-08-11 04:50:55 UTC) #6
falken
Jeffrey, what do you think of this change? It looks reasonable to me but I'm ...
6 years, 4 months ago (2014-08-12 00:23:43 UTC) #7
xiang
On 2014/08/12 00:23:43, falken wrote: > Jeffrey, what do you think of this change? It ...
6 years, 4 months ago (2014-08-12 07:24:40 UTC) #8
kinuko
DBC (warning: I've been away from the code for a while so I might be ...
6 years, 4 months ago (2014-08-12 15:27:07 UTC) #9
kinuko
https://codereview.chromium.org/443593002/diff/40001/content/browser/service_worker/service_worker_process_manager.cc File content/browser/service_worker/service_worker_process_manager.cc (right): https://codereview.chromium.org/443593002/diff/40001/content/browser/service_worker/service_worker_process_manager.cc#newcode77 content/browser/service_worker/service_worker_process_manager.cc:77: const GURL& scope, const std::vector<int>& pending_processes) { On 2014/08/12 ...
6 years, 4 months ago (2014-08-12 15:42:48 UTC) #10
Jeffrey Yasskin
Sorry for missing this. The special SiteInstance creation mode will take a lot of digging ...
6 years, 4 months ago (2014-08-19 23:42:24 UTC) #11
xiang
Thanks for the review, please take another look! I updated this CL, as it will ...
6 years, 3 months ago (2014-08-29 07:49:40 UTC) #12
dominicc (has gone to gerrit)
This informally LGTM modulo a couple of nits inline. You will need OWNERS review. I ...
6 years, 3 months ago (2014-09-03 17:49:59 UTC) #13
michaeln1
> In particular it looks better to pass objects like providers instead of process IDs ...
6 years, 3 months ago (2014-09-03 21:06:40 UTC) #14
michaeln
https://codereview.chromium.org/443593002/diff/60001/content/browser/service_worker/service_worker_provider_host.h File content/browser/service_worker/service_worker_provider_host.h (right): https://codereview.chromium.org/443593002/diff/60001/content/browser/service_worker/service_worker_provider_host.h#newcode147 content/browser/service_worker/service_worker_provider_host.h:147: std::vector<scoped_refptr<ServiceWorkerRegistration> > pending_registrations_; can this be a collection of ...
6 years, 3 months ago (2014-09-04 01:26:33 UTC) #15
michaeln
I'll ask Jeffrey to take another look. > provider_host->AddScopedProcessReferenceToPattern(pattern_) Using 'ProcessReferenceToPattern' in this method name ...
6 years, 3 months ago (2014-09-04 01:31:13 UTC) #16
xiang
Thanks for the review. CL updated, PTAL. https://codereview.chromium.org/443593002/diff/60001/content/browser/service_worker/service_worker_handle_unittest.cc File content/browser/service_worker/service_worker_handle_unittest.cc (right): https://codereview.chromium.org/443593002/diff/60001/content/browser/service_worker/service_worker_handle_unittest.cc#newcode60 content/browser/service_worker/service_worker_handle_unittest.cc:60: // Simulate ...
6 years, 3 months ago (2014-09-04 09:18:37 UTC) #17
xiang
> https://codereview.chromium.org/443593002/diff/60001/content/browser/service_worker/service_worker_register_job.cc#newcode67 > content/browser/service_worker/service_worker_register_job.cc:67: > pending_provider_hosts_.push_back(provider_host->AsWeakPtr()); > On 2014/09/04 01:26:32, michaeln wrote: > > Why ...
6 years, 3 months ago (2014-09-04 12:11:24 UTC) #18
michaeln
lgtm
6 years, 3 months ago (2014-09-05 00:50:12 UTC) #19
kinuko
Fyi, this lgtm 2.
6 years, 3 months ago (2014-09-08 08:07:48 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xiang.long@intel.com/443593002/120001
6 years, 3 months ago (2014-09-09 07:19:17 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/64303) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/53286) android_arm64_dbg_recipe ...
6 years, 3 months ago (2014-09-09 08:09:23 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xiang.long@intel.com/443593002/140001
6 years, 3 months ago (2014-09-09 08:49:35 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/3232) android_clang_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/3055) android_dbg_tests_recipe ...
6 years, 3 months ago (2014-09-09 09:17:27 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xiang.long@intel.com/443593002/160001
6 years, 3 months ago (2014-09-10 04:40:17 UTC) #30
commit-bot: I haz the power
Committed patchset #9 (id:160001) as c4b04204bc1637995dd6494b3a73f9eda6329cd8
6 years, 3 months ago (2014-09-10 05:48:14 UTC) #31
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 05:50:05 UTC) #32
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/3c4d6ceb7f29eaa4024bfe268e033a2ea296066b
Cr-Commit-Position: refs/heads/master@{#294113}

Powered by Google App Engine
This is Rietveld 408576698