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

Issue 1221503003: Add a mojo ServiceRegistry to embedded workers. (Closed)

Created:
5 years, 5 months ago by Marijn Kruisselbrink
Modified:
5 years, 5 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+watch, kinuko+serviceworker, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nhiroki, qsr+mojo_chromium.org, serviceworker-reviews, tzik, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a mojo ServiceRegistry to embedded workers. This sets up a pair of linked ServiceRegistry instances between the EmbeddedWorkerInstance in the browser and ServiceWorkerContextClient in the renderer. These ServiceRegistries can be used to use mojo to dispatch events to a serviceworker, avoiding any need for thread-hopping. This is used in https://codereview.chromium.org/1210643002 to implement the new navigator.services.onconnect event and in https://codereview.chromium.org/1220943003 for the background sync event. BUG=426458 Committed: https://crrev.com/27c9d745b80924002ac4c053fe77f6d9be0f1089 Cr-Commit-Position: refs/heads/master@{#339082}

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : make unit tests not crash #

Patch Set 4 : add comment #

Total comments: 2

Patch Set 5 : copy content/common/*.mojom OWNERS to service_worker subdirectory #

Total comments: 7

Patch Set 6 : move creation and destruction of ServiceRegistry to the correct spots on the browser side #

Total comments: 3

Patch Set 7 : move ServiceRegistryImpl to be part of WorkerContextData #

Total comments: 1

Patch Set 8 : add comment to BindServiceRegistry #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -2 lines) Patch
M content/browser/service_worker/embedded_worker_instance.h View 1 2 3 4 3 chunks +7 lines, -0 lines 0 comments Download
M content/browser/service_worker/embedded_worker_instance.cc View 1 2 3 4 5 7 chunks +36 lines, -0 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/common/service_worker/OWNERS View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
A + content/common/service_worker/embedded_worker_setup.mojom View 1 chunk +2 lines, -2 lines 0 comments Download
M content/content_common_mojo_bindings.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 4 chunks +42 lines, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.cc View 1 2 3 4 5 6 3 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (6 generated)
Marijn Kruisselbrink
+rockot: does this look reasonable from a mojo point of view (or is there somebody ...
5 years, 5 months ago (2015-07-07 15:09:03 UTC) #2
Ken Rockot(use gerrit already)
Yes this looks great. It's kind of unfortunate that we keep duplicating the "ExchangeServiceProviders" setup ...
5 years, 5 months ago (2015-07-07 16:59:57 UTC) #3
michaeln
https://codereview.chromium.org/1221503003/diff/60001/content/browser/service_worker/embedded_worker_instance.cc File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/1221503003/diff/60001/content/browser/service_worker/embedded_worker_instance.cc#newcode98 content/browser/service_worker/embedded_worker_instance.cc:98: setup->ExchangeServiceProviders(thread_id, services.Pass(), I'm not familiar enough to know what ...
5 years, 5 months ago (2015-07-07 22:15:09 UTC) #4
Ken Rockot(use gerrit already)
On 2015/07/07 22:15:09, michaeln wrote: > https://codereview.chromium.org/1221503003/diff/60001/content/browser/service_worker/embedded_worker_instance.cc > File content/browser/service_worker/embedded_worker_instance.cc (right): > > https://codereview.chromium.org/1221503003/diff/60001/content/browser/service_worker/embedded_worker_instance.cc#newcode98 > ...
5 years, 5 months ago (2015-07-07 22:36:52 UTC) #5
michaeln
message: Good answers :) Establishing a service registry pair per running instance makes sense to ...
5 years, 5 months ago (2015-07-08 01:03:53 UTC) #6
Ken Rockot(use gerrit already)
On 2015/07/08 01:03:53, michaeln wrote: > message: Good answers :) > > Establishing a service ...
5 years, 5 months ago (2015-07-08 01:52:36 UTC) #8
kinuko
(Drive-by, this one just caught my attention) On 2015/07/08 01:52:36, Ken Rockot wrote: > On ...
5 years, 5 months ago (2015-07-08 08:32:41 UTC) #9
Marijn Kruisselbrink
On 2015/07/08 at 08:32:41, kinuko wrote: > (Drive-by, this one just caught my attention) > ...
5 years, 5 months ago (2015-07-08 16:46:17 UTC) #10
Ken Rockot(use gerrit already)
On 2015/07/08 16:46:17, Marijn Kruisselbrink wrote: > On 2015/07/08 at 08:32:41, kinuko wrote: > > ...
5 years, 5 months ago (2015-07-08 17:39:26 UTC) #11
michaeln
The terms and distinctions between mojo application, shell, service, etc don't mean much to me ...
5 years, 5 months ago (2015-07-08 21:07:53 UTC) #12
Ken Rockot(use gerrit already)
On 2015/07/08 21:07:53, michaeln wrote: > The terms and distinctions between mojo application, shell, service, ...
5 years, 5 months ago (2015-07-08 21:47:08 UTC) #13
michaeln
On 2015/07/08 21:47:08, Ken Rockot wrote: > On 2015/07/08 21:07:53, michaeln wrote: > > The ...
5 years, 5 months ago (2015-07-08 22:32:14 UTC) #14
Ken Rockot(use gerrit already)
message: On 2015/07/08 22:32:14, michaeln wrote: > In the renderer, the main thread can block ...
5 years, 5 months ago (2015-07-09 00:13:38 UTC) #15
Marijn Kruisselbrink
On 2015/07/08 at 22:32:14, michaeln wrote: > On 2015/07/08 21:47:08, Ken Rockot wrote: > > ...
5 years, 5 months ago (2015-07-09 00:13:48 UTC) #16
michaeln
>> It doesn't look to me like an RHFI can change its SiteInstance. Hmmm, it ...
5 years, 5 months ago (2015-07-09 02:28:56 UTC) #17
kinuko
On 2015/07/09 00:13:48, Marijn Kruisselbrink wrote: > What exactly do we gain by somehow treating ...
5 years, 5 months ago (2015-07-09 02:36:22 UTC) #18
Marijn Kruisselbrink
On 2015/07/09 at 02:36:22, kinuko wrote: > On 2015/07/09 00:13:48, Marijn Kruisselbrink wrote: > > ...
5 years, 5 months ago (2015-07-09 16:00:56 UTC) #19
Ken Rockot(use gerrit already)
On 2015/07/09 16:00:56, Marijn Kruisselbrink wrote: > On 2015/07/09 at 02:36:22, kinuko wrote: > > ...
5 years, 5 months ago (2015-07-09 17:07:52 UTC) #20
Ken Rockot(use gerrit already)
On 2015/07/09 02:28:56, michaeln wrote: > >> It doesn't look to me like an RHFI ...
5 years, 5 months ago (2015-07-09 19:43:42 UTC) #21
Marijn Kruisselbrink
On 2015/07/09 at 19:43:42, rockot wrote: > On 2015/07/09 02:28:56, michaeln wrote: > > >> ...
5 years, 5 months ago (2015-07-09 19:59:30 UTC) #22
michaeln
On 2015/07/09 19:59:30, Marijn Kruisselbrink wrote: > On 2015/07/09 at 19:43:42, rockot wrote: > > ...
5 years, 5 months ago (2015-07-09 21:42:58 UTC) #23
Marijn Kruisselbrink
On 2015/07/09 at 21:42:58, michaeln wrote: > Meeting sgtm2, looking forward to it! I think ...
5 years, 5 months ago (2015-07-14 17:38:36 UTC) #24
michaeln
https://codereview.chromium.org/1221503003/diff/80001/content/browser/service_worker/embedded_worker_instance.cc File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/1221503003/diff/80001/content/browser/service_worker/embedded_worker_instance.cc#newcode221 content/browser/service_worker/embedded_worker_instance.cc:221: ServiceRegistry* EmbeddedWorkerInstance::GetServiceRegistry() { Maybe DCHECK its either STARTING or ...
5 years, 5 months ago (2015-07-15 02:34:22 UTC) #25
Marijn Kruisselbrink
https://codereview.chromium.org/1221503003/diff/80001/content/browser/service_worker/embedded_worker_instance.cc File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/1221503003/diff/80001/content/browser/service_worker/embedded_worker_instance.cc#newcode221 content/browser/service_worker/embedded_worker_instance.cc:221: ServiceRegistry* EmbeddedWorkerInstance::GetServiceRegistry() { On 2015/07/15 at 02:34:22, michaeln wrote: ...
5 years, 5 months ago (2015-07-15 18:13:28 UTC) #26
michaeln
https://codereview.chromium.org/1221503003/diff/80001/content/renderer/service_worker/service_worker_context_client.cc File content/renderer/service_worker/service_worker_context_client.cc (right): https://codereview.chromium.org/1221503003/diff/80001/content/renderer/service_worker/service_worker_context_client.cc#newcode278 content/renderer/service_worker/service_worker_context_client.cc:278: service_registry_.BindRemoteServiceProvider(exposed_services.Pass()); On 2015/07/15 18:13:28, Marijn Kruisselbrink wrote: > On ...
5 years, 5 months ago (2015-07-15 21:18:52 UTC) #28
Marijn Kruisselbrink
https://codereview.chromium.org/1221503003/diff/120001/content/renderer/service_worker/service_worker_context_client.h File content/renderer/service_worker/service_worker_context_client.h (right): https://codereview.chromium.org/1221503003/diff/120001/content/renderer/service_worker/service_worker_context_client.h#newcode227 content/renderer/service_worker/service_worker_context_client.h:227: ServiceRegistryImpl service_registry_; On 2015/07/15 at 21:18:52, michaeln wrote: > ...
5 years, 5 months ago (2015-07-15 21:45:58 UTC) #29
michaeln
On 2015/07/15 21:45:58, Marijn Kruisselbrink wrote: > https://codereview.chromium.org/1221503003/diff/120001/content/renderer/service_worker/service_worker_context_client.h > File content/renderer/service_worker/service_worker_context_client.h (right): > > https://codereview.chromium.org/1221503003/diff/120001/content/renderer/service_worker/service_worker_context_client.h#newcode227 ...
5 years, 5 months ago (2015-07-15 22:06:47 UTC) #30
Marijn Kruisselbrink
On 2015/07/15 at 22:06:47, michaeln wrote: > On 2015/07/15 21:45:58, Marijn Kruisselbrink wrote: > > ...
5 years, 5 months ago (2015-07-15 22:34:58 UTC) #31
michaeln
lgtm, thanx for being patient with my inane questions This looks like a reasonable way ...
5 years, 5 months ago (2015-07-15 23:35:00 UTC) #32
kinuko
Looks like the discussion between michaeln covered most of questions. lgtm/2 given that we basically ...
5 years, 5 months ago (2015-07-16 15:29:41 UTC) #33
Marijn Kruisselbrink
+tsepez for *.mojom OWNERS
5 years, 5 months ago (2015-07-16 17:22:03 UTC) #35
Tom Sepez
lgtm
5 years, 5 months ago (2015-07-16 18:14:51 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1221503003/160001
5 years, 5 months ago (2015-07-16 18:19:57 UTC) #39
commit-bot: I haz the power
Committed patchset #8 (id:160001)
5 years, 5 months ago (2015-07-16 18:30:32 UTC) #40
commit-bot: I haz the power
5 years, 5 months ago (2015-07-16 18:31:30 UTC) #41
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/27c9d745b80924002ac4c053fe77f6d9be0f1089
Cr-Commit-Position: refs/heads/master@{#339082}

Powered by Google App Engine
This is Rietveld 408576698