mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-23 02:31:55 +00:00
LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
This commit is contained in:
parent
ce23efc5f6
commit
f87041bf3a
Notes:
github-actions[bot]
2024-11-15 13:50:17 +00:00
Author: https://github.com/shannonbooth
Commit: f87041bf3a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2345
1722 changed files with 9939 additions and 9906 deletions
|
@ -16,7 +16,7 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(ServiceWorkerContainer);
|
||||
GC_DEFINE_ALLOCATOR(ServiceWorkerContainer);
|
||||
|
||||
ServiceWorkerContainer::ServiceWorkerContainer(JS::Realm& realm)
|
||||
: DOM::EventTarget(realm)
|
||||
|
@ -38,13 +38,13 @@ void ServiceWorkerContainer::visit_edges(Cell::Visitor& visitor)
|
|||
visitor.visit(m_service_worker_client);
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<ServiceWorkerContainer> ServiceWorkerContainer::create(JS::Realm& realm)
|
||||
GC::Ref<ServiceWorkerContainer> ServiceWorkerContainer::create(JS::Realm& realm)
|
||||
{
|
||||
return realm.create<ServiceWorkerContainer>(realm);
|
||||
}
|
||||
|
||||
// https://w3c.github.io/ServiceWorker/#navigator-service-worker-register
|
||||
JS::NonnullGCPtr<WebIDL::Promise> ServiceWorkerContainer::register_(String script_url, RegistrationOptions const& options)
|
||||
GC::Ref<WebIDL::Promise> ServiceWorkerContainer::register_(String script_url, RegistrationOptions const& options)
|
||||
{
|
||||
auto& realm = this->realm();
|
||||
// Note: The register(scriptURL, options) method creates or updates a service worker registration for the given scope url.
|
||||
|
@ -80,7 +80,7 @@ JS::NonnullGCPtr<WebIDL::Promise> ServiceWorkerContainer::register_(String scrip
|
|||
}
|
||||
|
||||
// https://w3c.github.io/ServiceWorker/#start-register-algorithm
|
||||
void ServiceWorkerContainer::start_register(Optional<URL::URL> scope_url, URL::URL script_url, JS::NonnullGCPtr<WebIDL::Promise> promise, EnvironmentSettingsObject& client, URL::URL referrer, Bindings::WorkerType worker_type, Bindings::ServiceWorkerUpdateViaCache update_via_cache)
|
||||
void ServiceWorkerContainer::start_register(Optional<URL::URL> scope_url, URL::URL script_url, GC::Ref<WebIDL::Promise> promise, EnvironmentSettingsObject& client, URL::URL referrer, Bindings::WorkerType worker_type, Bindings::ServiceWorkerUpdateViaCache update_via_cache)
|
||||
{
|
||||
auto& realm = this->realm();
|
||||
auto& vm = realm.vm();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue