w3c / compute-pressure

A web API proposal that provides information about available compute capacity
https://www.w3.org/TR/compute-pressure/
Other
69 stars 10 forks source link

Permission policy needs to be checked when owner set changes #243

Open kenchris opened 11 months ago

kenchris commented 11 months ago

I will assume that it is quite common that a site using shared workers, will create the worker, then turn on compute pressure in that worker, and then when additional same origin sites are loaded, they will connect to the shared worker.

As currently spec'ed, even if the second site doesn't have appropriate permission policy set, it will be able to receive telemetry data as we only check the permission policy when we start observing.

There doesn't look to be any nice hooks to hook into when owner set changes so we might need to monkey patch