mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
LibWeb: Make CSSStyleSheet::m_owner_css_rule a WeakPtr
It's not safe for this to be a raw pointer, as the imported style sheet can outlive the rule.
This commit is contained in:
parent
f47c658275
commit
e8b85b13e2
2 changed files with 4 additions and 3 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Weakable.h>
|
||||
#include <LibWeb/Bindings/Wrappable.h>
|
||||
#include <LibWeb/CSS/CSSStyleDeclaration.h>
|
||||
#include <LibWeb/CSS/Selector.h>
|
||||
|
@ -16,7 +17,8 @@ namespace Web::CSS {
|
|||
|
||||
class CSSRule
|
||||
: public RefCounted<CSSRule>
|
||||
, public Bindings::Wrappable {
|
||||
, public Bindings::Wrappable
|
||||
, public Weakable<CSSRule> {
|
||||
public:
|
||||
using WrapperType = Bindings::CSSRuleWrapper;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue