Commit Graph

4 Commits

Author SHA1 Message Date
Andreas Kling
d51d849943 LibWeb: Keep active platform timers alive during GC
Treat active Platform::Timer objects as event-loop roots so their GC
callbacks stay marked while the underlying Core::Timer can still fire.
Finalize unreachable timers by stopping the Core timer and dropping the
callback, preventing incremental sweep from leaving a timer with a raw
pointer to a swept GC::Function.
2026-05-10 10:58:11 +02:00
Andreas Kling
424a7943f1 LibWeb: Flatten Platform::Timer by merging TimerSerenity
TimerSerenity was the only implementation of the abstract Timer base
class. It simply wrapped a Core::Timer and delegated every method.

Remove the virtual dispatch by making Timer concrete and absorbing
the TimerSerenity implementation directly. Timer::create() now
allocates on the GC heap directly instead of going through
EventLoopPlugin::create_timer().
2026-02-28 15:32:14 +01:00
Shannon Booth
f87041bf3a 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
2024-11-15 14:49:20 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00