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

Issue 2638313002: Manage ServiceWorkerDispatcherHost in ServiceWorkerContextCore (Closed)

Created:
3 years, 11 months ago by shimazu
Modified:
3 years, 10 months ago
Reviewers:
falken, kinuko, dcheng, horo
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, viettrungluu+watch_chromium.org, qsr+mojo_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, jam, nhiroki, abarth-chromium, Aaron Boodman, kinuko+serviceworker, yzshen+watch_chromium.org, horo+watch_chromium.org, darin-cc_chromium.org, kinuko+watch, tzik, darin (slow to review), blink-worker-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Manage ServiceWorkerDispatcherHost in ServiceWorkerContextCore ServiceWorkerProviders for the service workers currently have the mesasge ordering issue between ProviderDestroyed and WorkerStopped. Associating the message pipes correctly will fix that. I'm planning to bind the ServiceWorkerProvider interfaces with the channel's pipe for pages and with the EmbeddedWorkerInstanceClient's pipe for service workers. This is the first patch to introduce the associated provider hosts. This patch - adds ServiceWorkerProviderHostInfo to send the params to SWDispatcherHost - manages SWDispatcherHost in SWContextCore - creates SWProviderHost by SWProviderHostInfo - removes three legacy IPC messages - ServiceWorkerHostMsg_ProviderCreated - ServiceWorkerHostMsg_ProviderDestroyed - ServiceWorkerHostMsg_SetVersionId BUG=668633, 676983, 629701 Review-Url: https://codereview.chromium.org/2638313002 Cr-Commit-Position: refs/heads/master@{#451745} Committed: https://chromium.googlesource.com/chromium/src/+/3b85dfb581ef764c8a02dbd803f54d0bbab1f318

Patch Set 1 #

Patch Set 2 : Update unittests/browsertest not to use ctor #

Patch Set 3 : Rebase and add _struct_traits*.* to OWNERS #

Patch Set 4 : Relax too strong validation in struct_traits #

Patch Set 5 : Move ServiceWorkerProviderHostInfo to service_worker_provider.mojom #

Patch Set 6 : Remove unnecessary include and const ref #

Patch Set 7 : Remove unnecessary change and wrap by 80 chars #

Patch Set 8 : Add a newline #

Total comments: 20

Patch Set 9 : Removed sender map and filter map from EWRegistry #

Patch Set 10 : Fix failing tests #

Patch Set 11 : Moved CreateForTesting and comments #

Patch Set 12 : Remove a break line #

Total comments: 30

Patch Set 13 : Addressed falken@ and horo@'s comments #

Patch Set 14 : Rebased #

Total comments: 8

Patch Set 15 : Addressed falken's comments #

Patch Set 16 : Fix an include guard #

Total comments: 29

Patch Set 17 : Renamed a variable #

Patch Set 18 : Addressed dcheng's comment #

Patch Set 19 : rebase #

Patch Set 20 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+754 lines, -494 lines) Patch
M content/browser/service_worker/embedded_worker_registry.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +7 lines, -9 lines 0 comments Download
M content/browser/service_worker/embedded_worker_registry.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +12 lines, -20 lines 0 comments Download
M content/browser/service_worker/embedded_worker_test_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/service_worker/embedded_worker_test_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +39 lines, -2 lines 0 comments Download
M content/browser/service_worker/foreign_fetch_request_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +43 lines, -23 lines 0 comments Download
M content/browser/service_worker/link_header_support_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 17 chunks +48 lines, -26 lines 0 comments Download
M content/browser/service_worker/service_worker_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +5 lines, -7 lines 0 comments Download
M content/browser/service_worker/service_worker_context_core.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +11 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_context_core.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 8 chunks +36 lines, -18 lines 0 comments Download
M content/browser/service_worker/service_worker_context_request_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -7 lines 0 comments Download
M content/browser/service_worker/service_worker_context_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +31 lines, -31 lines 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +5 lines, -4 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 chunks +18 lines, -40 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +21 lines, -22 lines 0 comments Download
M content/browser/service_worker/service_worker_handle_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +5 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -7 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +20 lines, -26 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +24 lines, -8 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +79 lines, -59 lines 0 comments Download
M content/browser/service_worker/service_worker_registration_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -7 lines 0 comments Download
M content/browser/service_worker/service_worker_storage_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +9 lines, -15 lines 0 comments Download
M content/browser/service_worker/service_worker_test_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +27 lines, -0 lines 0 comments Download
A content/browser/service_worker/service_worker_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +50 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_url_request_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_version_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +5 lines, -13 lines 0 comments Download
M content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -6 lines 0 comments Download
M content/child/service_worker/service_worker_network_provider.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M content/child/service_worker/service_worker_network_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +9 lines, -22 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +3 lines, -0 lines 0 comments Download
M content/common/service_worker/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +7 lines, -6 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +0 lines, -37 lines 0 comments Download
A content/common/service_worker/service_worker_provider.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +18 lines, -0 lines 0 comments Download
A content/common/service_worker/service_worker_provider.typemap View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +12 lines, -0 lines 0 comments Download
A content/common/service_worker/service_worker_provider_host_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +53 lines, -0 lines 0 comments Download
A content/common/service_worker/service_worker_provider_host_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +30 lines, -0 lines 0 comments Download
A content/common/service_worker/service_worker_provider_struct_traits.h View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download
A content/common/service_worker/service_worker_provider_struct_traits.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +22 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker_types.typemap View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
A + content/common/service_worker/service_worker_types_struct_traits.h View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
A content/common/service_worker/service_worker_types_struct_traits.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +24 lines, -0 lines 0 comments Download
D content/common/service_worker/service_worker_types_traits.h View 1 chunk +0 lines, -24 lines 0 comments Download
D content/common/service_worker/service_worker_types_traits.cc View 1 chunk +0 lines, -24 lines 0 comments Download
M content/common/typemaps.gni View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 91 (62 generated)
shimazu
external/wpt/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions.html still looks failing, but could you give me a first round review?
3 years, 11 months ago (2017-01-25 07:31:29 UTC) #21
horo
https://codereview.chromium.org/2638313002/diff/140001/content/browser/service_worker/service_worker_provider_host.h File content/browser/service_worker/service_worker_provider_host.h (right): https://codereview.chromium.org/2638313002/diff/140001/content/browser/service_worker/service_worker_provider_host.h#newcode84 content/browser/service_worker/service_worker_provider_host.h:84: static std::unique_ptr<ServiceWorkerProviderHost> CreateForTesting( How about adding "bool is_parent_frame_secure" argument? ...
3 years, 11 months ago (2017-01-26 02:40:23 UTC) #22
falken
Some comments. https://codereview.chromium.org/2638313002/diff/140001/content/browser/service_worker/service_worker_context_core.cc File content/browser/service_worker/service_worker_context_core.cc (right): https://codereview.chromium.org/2638313002/diff/140001/content/browser/service_worker/service_worker_context_core.cc#newcode281 content/browser/service_worker/service_worker_context_core.cc:281: dispatcher_host->message_port_message_filter()); Why does ServiceWorkerContextCore need dispatcher_hosts_ if ...
3 years, 11 months ago (2017-01-26 05:15:43 UTC) #24
shimazu
Thanks for your comments. For comments I've replied to as ack, I'll fix them later. ...
3 years, 11 months ago (2017-01-26 09:27:23 UTC) #27
shimazu
Updated for the remaining. ptal again:) https://codereview.chromium.org/2638313002/diff/140001/content/browser/service_worker/service_worker_provider_host.h File content/browser/service_worker/service_worker_provider_host.h (right): https://codereview.chromium.org/2638313002/diff/140001/content/browser/service_worker/service_worker_provider_host.h#newcode84 content/browser/service_worker/service_worker_provider_host.h:84: static std::unique_ptr<ServiceWorkerProviderHost> CreateForTesting( ...
3 years, 10 months ago (2017-02-07 08:47:02 UTC) #34
horo
Please update the CL title and description. https://codereview.chromium.org/2638313002/diff/220001/content/browser/service_worker/embedded_worker_test_helper.cc File content/browser/service_worker/embedded_worker_test_helper.cc (right): https://codereview.chromium.org/2638313002/diff/220001/content/browser/service_worker/embedded_worker_test_helper.cc#newcode80 content/browser/service_worker/embedded_worker_test_helper.cc:80: }; nit: ...
3 years, 10 months ago (2017-02-08 02:14:11 UTC) #35
falken
https://codereview.chromium.org/2638313002/diff/220001/content/browser/service_worker/embedded_worker_registry.cc File content/browser/service_worker/embedded_worker_registry.cc (right): https://codereview.chromium.org/2638313002/diff/220001/content/browser/service_worker/embedded_worker_registry.cc#newcode195 content/browser/service_worker/embedded_worker_registry.cc:195: // than OnStopped so UMA doesn't record it as ...
3 years, 10 months ago (2017-02-08 06:53:51 UTC) #36
falken
https://codereview.chromium.org/2638313002/diff/220001/content/common/service_worker/service_worker_provider.h File content/common/service_worker/service_worker_provider.h (right): https://codereview.chromium.org/2638313002/diff/220001/content/common/service_worker/service_worker_provider.h#newcode12 content/common/service_worker/service_worker_provider.h:12: struct CONTENT_EXPORT ServiceWorkerProviderHostInfo { nit: If this is the ...
3 years, 10 months ago (2017-02-09 01:03:20 UTC) #37
shimazu
Updated the patch. PTAL again:) https://codereview.chromium.org/2638313002/diff/220001/content/browser/service_worker/embedded_worker_registry.cc File content/browser/service_worker/embedded_worker_registry.cc (right): https://codereview.chromium.org/2638313002/diff/220001/content/browser/service_worker/embedded_worker_registry.cc#newcode195 content/browser/service_worker/embedded_worker_registry.cc:195: // than OnStopped so ...
3 years, 10 months ago (2017-02-13 03:25:56 UTC) #47
falken
lgtm https://codereview.chromium.org/2638313002/diff/220001/content/common/service_worker/service_worker_provider.h File content/common/service_worker/service_worker_provider.h (right): https://codereview.chromium.org/2638313002/diff/220001/content/common/service_worker/service_worker_provider.h#newcode12 content/common/service_worker/service_worker_provider.h:12: struct CONTENT_EXPORT ServiceWorkerProviderHostInfo { On 2017/02/13 03:25:56, shimazu ...
3 years, 10 months ago (2017-02-13 05:59:24 UTC) #48
horo
lgtm
3 years, 10 months ago (2017-02-13 07:32:38 UTC) #51
shimazu
dcheng@chromium.org: Please review changes in _messages.h, mojom and struct_traits. kinuko@chromium.org: Please review changes in BUILD.gn ...
3 years, 10 months ago (2017-02-13 08:20:19 UTC) #53
kinuko
lgtm https://codereview.chromium.org/2638313002/diff/300001/content/child/service_worker/service_worker_network_provider.cc File content/child/service_worker/service_worker_network_provider.cc (right): https://codereview.chromium.org/2638313002/diff/300001/content/child/service_worker/service_worker_network_provider.cc#newcode130 content/child/service_worker/service_worker_network_provider.cc:130: ServiceWorkerProviderHostInfo host_info(provider_id_, route_id, provider_type, nit: I feel it ...
3 years, 10 months ago (2017-02-14 02:25:38 UTC) #54
shimazu
https://codereview.chromium.org/2638313002/diff/300001/content/child/service_worker/service_worker_network_provider.cc File content/child/service_worker/service_worker_network_provider.cc (right): https://codereview.chromium.org/2638313002/diff/300001/content/child/service_worker/service_worker_network_provider.cc#newcode130 content/child/service_worker/service_worker_network_provider.cc:130: ServiceWorkerProviderHostInfo host_info(provider_id_, route_id, provider_type, On 2017/02/14 02:25:38, kinuko wrote: ...
3 years, 10 months ago (2017-02-14 07:58:14 UTC) #55
dcheng
Overall, looks good. Just a few questions (not all IPC related, sorry!) and a few ...
3 years, 10 months ago (2017-02-14 08:47:46 UTC) #56
shimazu
Updated the patch, thanks for reviewing! PTAL again. falken@: Could you respond to the following ...
3 years, 10 months ago (2017-02-15 02:24:19 UTC) #57
dcheng
mojo lgtm https://codereview.chromium.org/2638313002/diff/300001/content/browser/service_worker/service_worker_provider_host.cc File content/browser/service_worker/service_worker_provider_host.cc (right): https://codereview.chromium.org/2638313002/diff/300001/content/browser/service_worker/service_worker_provider_host.cc#newcode94 content/browser/service_worker/service_worker_provider_host.cc:94: auto host = base::WrapUnique(new ServiceWorkerProviderHost( On 2017/02/15 ...
3 years, 10 months ago (2017-02-15 04:29:35 UTC) #62
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/2638313002/360001
3 years, 10 months ago (2017-02-15 06:20:04 UTC) #65
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/155488)
3 years, 10 months ago (2017-02-15 07:25:58 UTC) #67
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/2638313002/360001
3 years, 10 months ago (2017-02-16 00:29:44 UTC) #69
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
3 years, 10 months ago (2017-02-16 02:34:48 UTC) #71
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/2638313002/360001
3 years, 10 months ago (2017-02-16 09:04:43 UTC) #73
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/120391)
3 years, 10 months ago (2017-02-16 10:48:08 UTC) #75
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/2638313002/360001
3 years, 10 months ago (2017-02-20 07:48:46 UTC) #77
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/156498) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 10 months ago (2017-02-20 07:50:56 UTC) #79
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/2638313002/380001
3 years, 10 months ago (2017-02-21 03:56:23 UTC) #84
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_tsan_rel_ng/builds/18591)
3 years, 10 months ago (2017-02-21 05:30:13 UTC) #86
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/2638313002/380001
3 years, 10 months ago (2017-02-21 12:16:58 UTC) #88
commit-bot: I haz the power
3 years, 10 months ago (2017-02-21 13:04:12 UTC) #91
Message was sent while issue was closed.
Committed patchset #20 (id:380001) as
https://chromium.googlesource.com/chromium/src/+/3b85dfb581ef764c8a02dbd803f5...

Powered by Google App Engine
This is Rietveld 408576698