mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:27:39 +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
|
@ -45,10 +45,12 @@ public:
|
|||
private:
|
||||
DOMTokenList(Element const& associated_element, FlyString associated_attribute);
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
WebIDL::ExceptionOr<void> validate_token(StringView token) const;
|
||||
void run_update_steps();
|
||||
|
||||
WeakPtr<Element> m_associated_element;
|
||||
JS::NonnullGCPtr<Element> m_associated_element;
|
||||
FlyString m_associated_attribute;
|
||||
Vector<DeprecatedString> m_token_set;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue