diff options
author | Andreas Kling <kling@serenityos.org> | 2021-12-05 15:28:38 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-06 19:22:16 +0100 |
commit | f47c658275e2f5f5b35f8926a997a976ec60de11 (patch) | |
tree | a8f836a83c1e3d0b2f4a4acbcf0f4c0201b068f5 /Userland/Libraries/LibWeb/CSS/CSSImportRule.h | |
parent | 0f9ca51c7625d66c2728f8837af1eafd614bae0a (diff) | |
download | serenity-f47c658275e2f5f5b35f8926a997a976ec60de11.zip |
LibWeb: Make CSSImportRule::m_document a WeakPtr
It's not safe for this to be a raw reference, as CSSImportRule can
outlive the document.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/CSSImportRule.h')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/CSSImportRule.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/CSSImportRule.h b/Userland/Libraries/LibWeb/CSS/CSSImportRule.h index 5ab22f9d8d..3958c54708 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSImportRule.h +++ b/Userland/Libraries/LibWeb/CSS/CSSImportRule.h @@ -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; }; |