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
parent ce23efc5f6
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

@ -54,9 +54,9 @@ inline void replace_in_ordered_set(Vector<String>& set, String const& item, Stri
namespace Web::DOM {
JS_DEFINE_ALLOCATOR(DOMTokenList);
GC_DEFINE_ALLOCATOR(DOMTokenList);
JS::NonnullGCPtr<DOMTokenList> DOMTokenList::create(Element& associated_element, FlyString associated_attribute)
GC::Ref<DOMTokenList> DOMTokenList::create(Element& associated_element, FlyString associated_attribute)
{
auto& realm = associated_element.realm();
return realm.create<DOMTokenList>(associated_element, move(associated_attribute));
@ -253,7 +253,7 @@ String DOMTokenList::value() const
// https://dom.spec.whatwg.org/#ref-for-concept-element-attributes-set-value%E2%91%A2
void DOMTokenList::set_value(String const& value)
{
JS::GCPtr<DOM::Element> associated_element = m_associated_element.ptr();
GC::Ptr<DOM::Element> associated_element = m_associated_element.ptr();
if (!associated_element)
return;
@ -284,7 +284,7 @@ WebIDL::ExceptionOr<void> DOMTokenList::validate_token_not_whitespace(StringView
// https://dom.spec.whatwg.org/#concept-dtl-update
void DOMTokenList::run_update_steps()
{
JS::GCPtr<DOM::Element> associated_element = m_associated_element.ptr();
GC::Ptr<DOM::Element> associated_element = m_associated_element.ptr();
if (!associated_element)
return;