mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-23 18:51:55 +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
|
@ -16,19 +16,19 @@
|
|||
|
||||
namespace Web::DOM {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(Attr);
|
||||
GC_DEFINE_ALLOCATOR(Attr);
|
||||
|
||||
JS::NonnullGCPtr<Attr> Attr::create(Document& document, FlyString local_name, String value, Element* owner_element)
|
||||
GC::Ref<Attr> Attr::create(Document& document, FlyString local_name, String value, Element* owner_element)
|
||||
{
|
||||
return document.realm().create<Attr>(document, QualifiedName(move(local_name), Optional<FlyString> {}, Optional<FlyString> {}), move(value), owner_element);
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<Attr> Attr::create(Document& document, QualifiedName qualified_name, String value, Element* owner_element)
|
||||
GC::Ref<Attr> Attr::create(Document& document, QualifiedName qualified_name, String value, Element* owner_element)
|
||||
{
|
||||
return document.realm().create<Attr>(document, move(qualified_name), move(value), owner_element);
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<Attr> Attr::clone(Document& document)
|
||||
GC::Ref<Attr> Attr::clone(Document& document)
|
||||
{
|
||||
return realm().create<Attr>(document, m_qualified_name, m_value, nullptr);
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ void Attr::handle_attribute_changes(Element& element, Optional<String> const& ol
|
|||
if (element.is_custom()) {
|
||||
auto& vm = this->vm();
|
||||
|
||||
JS::MarkedVector<JS::Value> arguments { vm.heap() };
|
||||
GC::MarkedVector<JS::Value> arguments { vm.heap() };
|
||||
arguments.append(JS::PrimitiveString::create(vm, local_name()));
|
||||
arguments.append(!old_value.has_value() ? JS::js_null() : JS::PrimitiveString::create(vm, old_value.value()));
|
||||
arguments.append(!new_value.has_value() ? JS::js_null() : JS::PrimitiveString::create(vm, new_value.value()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue