mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
LibWeb: Use a JS::NonnullGCPtr for DOMTokenList::m_associated_element
Both Element and DOMTokenList are GC-allocated objects so they can just mark each other instead of using the old strong/weak pattern we use in ref-counting ownership models.
This commit is contained in:
parent
59d9d1d07a
commit
7d863174b3
2 changed files with 9 additions and 1 deletions
|
@ -68,6 +68,12 @@ DOMTokenList::DOMTokenList(Element const& associated_element, FlyString associat
|
|||
associated_attribute_changed(value);
|
||||
}
|
||||
|
||||
void DOMTokenList::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_associated_element);
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#ref-for-domtokenlist%E2%91%A0%E2%91%A1
|
||||
void DOMTokenList::associated_attribute_changed(StringView value)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue