mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-21 01: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
|
@ -10,7 +10,7 @@
|
|||
|
||||
namespace Web::DOM {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(DocumentObserver);
|
||||
GC_DEFINE_ALLOCATOR(DocumentObserver);
|
||||
|
||||
DocumentObserver::DocumentObserver(JS::Realm& realm, DOM::Document& document)
|
||||
: Bindings::PlatformObject(realm)
|
||||
|
@ -39,7 +39,7 @@ void DocumentObserver::finalize()
|
|||
void DocumentObserver::set_document_became_inactive(Function<void()> callback)
|
||||
{
|
||||
if (callback)
|
||||
m_document_became_inactive = JS::create_heap_function(vm().heap(), move(callback));
|
||||
m_document_became_inactive = GC::create_function(vm().heap(), move(callback));
|
||||
else
|
||||
m_document_became_inactive = nullptr;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ void DocumentObserver::set_document_became_inactive(Function<void()> callback)
|
|||
void DocumentObserver::set_document_completely_loaded(Function<void()> callback)
|
||||
{
|
||||
if (callback)
|
||||
m_document_completely_loaded = JS::create_heap_function(vm().heap(), move(callback));
|
||||
m_document_completely_loaded = GC::create_function(vm().heap(), move(callback));
|
||||
else
|
||||
m_document_completely_loaded = nullptr;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ void DocumentObserver::set_document_completely_loaded(Function<void()> callback)
|
|||
void DocumentObserver::set_document_readiness_observer(Function<void(HTML::DocumentReadyState)> callback)
|
||||
{
|
||||
if (callback)
|
||||
m_document_readiness_observer = JS::create_heap_function(vm().heap(), move(callback));
|
||||
m_document_readiness_observer = GC::create_function(vm().heap(), move(callback));
|
||||
else
|
||||
m_document_readiness_observer = nullptr;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ void DocumentObserver::set_document_readiness_observer(Function<void(HTML::Docum
|
|||
void DocumentObserver::set_document_visibility_state_observer(Function<void(HTML::VisibilityState)> callback)
|
||||
{
|
||||
if (callback)
|
||||
m_document_visibility_state_observer = JS::create_heap_function(vm().heap(), move(callback));
|
||||
m_document_visibility_state_observer = GC::create_function(vm().heap(), move(callback));
|
||||
else
|
||||
m_document_visibility_state_observer = nullptr;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ void DocumentObserver::set_document_visibility_state_observer(Function<void(HTML
|
|||
void DocumentObserver::set_document_page_showing_observer(Function<void(bool)> callback)
|
||||
{
|
||||
if (callback)
|
||||
m_document_page_showing_observer = JS::create_heap_function(vm().heap(), move(callback));
|
||||
m_document_page_showing_observer = GC::create_function(vm().heap(), move(callback));
|
||||
else
|
||||
m_document_page_showing_observer = nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue