mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 22:59:33 +00:00
LibWeb: Add service worker client to ServiceWorkerContainer
This commit is contained in:
parent
ade4fc1779
commit
0ece40c466
Notes:
github-actions[bot]
2024-09-07 09:39:51 +00:00
Author: https://github.com/ADKaster
Commit: 0ece40c466
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1293
Reviewed-by: https://github.com/awesomekling
2 changed files with 13 additions and 1 deletions
|
@ -17,15 +17,24 @@ JS_DEFINE_ALLOCATOR(ServiceWorkerContainer);
|
|||
|
||||
ServiceWorkerContainer::ServiceWorkerContainer(JS::Realm& realm)
|
||||
: DOM::EventTarget(realm)
|
||||
, m_service_worker_client(relevant_settings_object(*this))
|
||||
{
|
||||
}
|
||||
|
||||
ServiceWorkerContainer::~ServiceWorkerContainer() = default;
|
||||
|
||||
void ServiceWorkerContainer::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(ServiceWorkerContainer);
|
||||
}
|
||||
|
||||
void ServiceWorkerContainer::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_service_worker_client);
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<ServiceWorkerContainer> ServiceWorkerContainer::create(JS::Realm& realm)
|
||||
{
|
||||
return realm.heap().allocate<ServiceWorkerContainer>(realm, realm);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue