LibWeb: Make CSSImportList mark its document

We don't need to use a WeakPtr here anymore, since the garbage collector
will resolve any cycles.
This commit is contained in:
Andreas Kling 2022-09-03 15:44:06 +02:00
parent a835f313f7
commit 36085676d2
Notes: sideshowbarker 2024-07-17 10:10:18 +09:00
2 changed files with 3 additions and 2 deletions

View file

@ -43,6 +43,7 @@ CSSImportRule::CSSImportRule(AK::URL url, DOM::Document& document)
void CSSImportRule::visit_edges(Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
visitor.visit(m_document);
visitor.visit(m_style_sheet);
}

View file

@ -50,9 +50,9 @@ private:
virtual void resource_did_load() override;
AK::URL m_url;
WeakPtr<DOM::Document> m_document;
JS::GCPtr<DOM::Document> m_document;
JS::GCPtr<CSSStyleSheet> m_style_sheet;
Optional<DOM::DocumentLoadEventDelayer> m_document_load_event_delayer;
CSSStyleSheet* m_style_sheet { nullptr };
};
template<>