mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-04 18:23:39 +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
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Heap/HeapFunction.h>
|
||||
#include <LibGC/Function.h>
|
||||
#include <LibWeb/Platform/EventLoopPlugin.h>
|
||||
#include <LibWeb/Platform/Timer.h>
|
||||
|
||||
|
@ -18,12 +18,12 @@ void Timer::visit_edges(JS::Cell::Visitor& visitor)
|
|||
visitor.visit(on_timeout);
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<Timer> Timer::create(JS::Heap& heap)
|
||||
GC::Ref<Timer> Timer::create(GC::Heap& heap)
|
||||
{
|
||||
return EventLoopPlugin::the().create_timer(heap);
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<Timer> Timer::create_repeating(JS::Heap& heap, int interval_ms, JS::GCPtr<JS::HeapFunction<void()>> timeout_handler)
|
||||
GC::Ref<Timer> Timer::create_repeating(GC::Heap& heap, int interval_ms, GC::Ptr<GC::Function<void()>> timeout_handler)
|
||||
{
|
||||
auto timer = EventLoopPlugin::the().create_timer(heap);
|
||||
timer->set_single_shot(false);
|
||||
|
@ -32,7 +32,7 @@ JS::NonnullGCPtr<Timer> Timer::create_repeating(JS::Heap& heap, int interval_ms,
|
|||
return timer;
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<Timer> Timer::create_single_shot(JS::Heap& heap, int interval_ms, JS::GCPtr<JS::HeapFunction<void()>> timeout_handler)
|
||||
GC::Ref<Timer> Timer::create_single_shot(GC::Heap& heap, int interval_ms, GC::Ptr<GC::Function<void()>> timeout_handler)
|
||||
{
|
||||
auto timer = EventLoopPlugin::the().create_timer(heap);
|
||||
timer->set_single_shot(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue