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:
Shannon Booth 2024-11-15 04:01:23 +13:00 committed by Andreas Kling
commit f87041bf3a
Notes: github-actions[bot] 2024-11-15 13:50:17 +00:00
1722 changed files with 9939 additions and 9906 deletions

View file

@ -16,7 +16,7 @@ namespace Web::WebVTT {
// https://w3c.github.io/webvtt/#vttcue
class VTTCue final : public HTML::TextTrackCue {
WEB_PLATFORM_OBJECT(VTTCue, HTML::TextTrackCue);
JS_DECLARE_ALLOCATOR(VTTCue);
GC_DECLARE_ALLOCATOR(VTTCue);
public:
enum class WritingDirection : u8 {
@ -30,11 +30,11 @@ public:
VerticalGrowingRight,
};
static WebIDL::ExceptionOr<JS::NonnullGCPtr<VTTCue>> construct_impl(JS::Realm&, double start_time, double end_time, String const& text);
static WebIDL::ExceptionOr<GC::Ref<VTTCue>> construct_impl(JS::Realm&, double start_time, double end_time, String const& text);
virtual ~VTTCue() override = default;
JS::GCPtr<VTTRegion> region() const { return m_region; }
void set_region(JS::GCPtr<VTTRegion> region) { m_region = region; }
GC::Ptr<VTTRegion> region() const { return m_region; }
void set_region(GC::Ptr<VTTRegion> region) { m_region = region; }
Bindings::DirectionSetting vertical() const;
void set_vertical(Bindings::DirectionSetting);
@ -61,7 +61,7 @@ protected:
Bindings::PositionAlignSetting computed_position_alignment();
private:
VTTCue(JS::Realm&, JS::GCPtr<HTML::TextTrack>);
VTTCue(JS::Realm&, GC::Ptr<HTML::TextTrack>);
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(Visitor&) override;
@ -88,7 +88,7 @@ private:
Bindings::AlignSetting m_text_alignment { Bindings::AlignSetting::Center };
// https://w3c.github.io/webvtt/#webvtt-cue-region
JS::GCPtr<VTTRegion> m_region;
GC::Ptr<VTTRegion> m_region;
};
}