Commit graph

6 commits

Author SHA1 Message Date
Andreas Kling
164ed80244 Meta: Enable exit-time destructor warnings for libraries
Enable -Wexit-time-destructors for all in-tree library targets and
update process-lifetime library statics so they no longer register
exit-time destructors. Long-lived caches, lookup tables, singleton
registries, and generated constants now use NeverDestroyed or leaked
references where the data is intended to live until process exit.

Update LibWeb, LibLine, and the binding generators so regenerated
sources follow the same rule instead of reintroducing destructed
statics.
2026-06-04 19:20:49 +02:00
Andreas Kling
1835d739f5 LibWeb: Implement ServiceWorkerContainer getRegistrations
Expose ServiceWorkerContainer.getRegistrations() and implement the
Service Workers algorithm for collecting registrations matching the
current client's storage key. Resolve the promise with a frozen array
of ServiceWorkerRegistration objects, matching the Web-exposed return
type.

Use OrderedHashMap for the temporary LibWeb registration map, since the
Service Workers spec defines the registration map as ordered and
getRegistrations() exposes that iteration order.

Add text coverage for the no-registration case used by TradingView's
startup path. Without this method, the page threw while calling
navigator.serviceWorker.getRegistrations() and aborted before rendering
its chart.
2026-05-23 19:11:01 +02:00
Feng Yu
37e1d6ece1 LibWeb: Implement nagivator.serviceWorker.getRegistration() 2025-01-30 15:18:43 -07:00
Shannon Booth
0fa54c2327 LibURL+LibWeb: Make URL::serialize return a String
Simplifying a bunch of uneeded error handling around the place.
2024-12-04 16:34:13 +00:00
Shannon Booth
2918405360 LibWeb: Rename ServiceWorker::ServiceWorker to ServiceWorkerRecord
This is to resolve naming conflicts between the ServiceWorker JS exposed
object and the internal representation of a ServiceWorker which is going
to be stored cross process.
2024-11-30 11:19:35 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Libraries/LibWeb/ServiceWorker/Registration.cpp (Browse further)