New issue
Advanced search Search tips

Issue 901609 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug

Blocked on:
issue 371690



Sign in to add a comment

UseCounter on service workers is not propagated to controlled dedicated workers and shared workers

Project Member Reported by nhiroki@chromium.org, Nov 3

Issue description

UseCounter on service workers is supposed to be propagated to controlled windows, dedicated workers, shared workers. See the design doc for details:
https://docs.google.com/document/d/1VyYZnhjBdk-MzCRAcX37TM5-yjwTY40U_J9rWnEAo8c/edit

Currently, this is propagated via ServiceWorkerContainer::CountFeature(). However, dedicated workers and shared workers don't implement ServiceWorkerContainer yet, so UseCounter on service workers are never propagated to them.

Issue 371690 ("Support navigator.serviceWorker in WorkerNavigator") is relevant.
 
I found this when I was adding tests for UseCounter with SharedWorkers and ServiceWorkers:
https://chromium-review.googlesource.com/c/chromium/src/+/1308959
Currently dedicated workers in chrome inherit their controller from the owning document, correct?  If so, it seems the use counter will then be applied at the document level correctly since it must also be controlled.

When dedicated workers are updated to match the spec and get controlled based on their script URL then it seems possible the use counter will be lost.
wanderview@: Good point! Yes, you're right.

I think this doesn't block correcting service worker's scope match for dedicated workers because controlling only dedicated workers would relatively be rare (no data, just my guess), it's definitely nice if we can fix this before that though.
Blockedon: 371690

Sign in to add a comment