The service worker process of united.com sometimes uses 100% of CPU.
Created attachment 370115 [details] sample
Observed on the system safari shipped with macOS Mojave 18E226
<rdar://problem/50899544>
I guess https://bugs.webkit.org/show_bug.cgi?id=196585 mitigated this issue to an extent.
https://bugs.webkit.org/show_bug.cgi?id=197580, https://bugs.webkit.org/show_bug.cgi?id=197626 and https://bugs.webkit.org/show_bug.cgi?id=185626 should limit the effect of the underlying bug.
Same with pinterest.com and photos.google.com. Would be nice if there will be some approval by user like for Geolocation API before the worker installation.
If there were an approval step, what privilege would the user be approving? In this case, I think the privilege was the use of the CPU -- but a webpage already has that privilege (when in the foreground).
Priviledge to run in background (even if webpage is closed)?
(In reply to bobik from comment #8) > Priviledge to run in background (even if webpage is closed)? By design, when the last service worker client is closed, the service worker will be stopped. If that is not the case, this is a bug in WebKit implementation. Ditto for CPU usage, a service worker is not expected to use more CPU than what is allowed for its clients. Some fixes have been done recently in that area that have shipped in recent Safari Tech Preview. If you are still seeing such issues, let us know.