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

@ -17,12 +17,12 @@ class Text
: public CharacterData
, public SlottableMixin {
WEB_PLATFORM_OBJECT(Text, CharacterData);
JS_DECLARE_ALLOCATOR(Text);
GC_DECLARE_ALLOCATOR(Text);
public:
virtual ~Text() override = default;
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Text>> construct_impl(JS::Realm& realm, String const& data);
static WebIDL::ExceptionOr<GC::Ref<Text>> construct_impl(JS::Realm& realm, String const& data);
// ^Node
virtual FlyString node_name() const override { return "#text"_fly_string; }
@ -33,7 +33,7 @@ public:
Optional<size_t> max_length() const { return m_max_length; }
void set_max_length(Optional<size_t> max_length) { m_max_length = move(max_length); }
WebIDL::ExceptionOr<JS::NonnullGCPtr<Text>> split_text(size_t offset);
WebIDL::ExceptionOr<GC::Ref<Text>> split_text(size_t offset);
String whole_text();
bool is_password_input() const { return m_is_password_input; }
@ -49,7 +49,7 @@ protected:
virtual void visit_edges(Cell::Visitor&) override;
private:
JS::GCPtr<Element> m_owner;
GC::Ptr<Element> m_owner;
bool m_always_editable { false };
Optional<size_t> m_max_length {};