mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
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:
parent
a835f313f7
commit
36085676d2
Notes:
sideshowbarker
2024-07-17 10:10:18 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/36085676d2 Pull-request: https://github.com/SerenityOS/serenity/pull/14816 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg ✅
2 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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<>
|
||||
|
|
Loading…
Reference in a new issue