1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:37:35 +00:00

LibWeb: Make CSSImportRule::m_document a WeakPtr

It's not safe for this to be a raw reference, as CSSImportRule can
outlive the document.
This commit is contained in:
Andreas Kling 2021-12-05 15:28:38 +01:00
parent 0f9ca51c76
commit f47c658275
2 changed files with 6 additions and 3 deletions

View file

@ -48,7 +48,7 @@ private:
virtual void resource_did_load() override;
AK::URL m_url;
DOM::Document& m_document;
WeakPtr<DOM::Document> m_document;
Optional<DOM::DocumentLoadEventDelayer> m_document_load_event_delayer;
RefPtr<CSSStyleSheet> m_style_sheet;
};