mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated
This is a monster patch that turns all EventTargets into GC-allocated PlatformObjects. Their C++ wrapper classes are removed, and the LibJS garbage collector is now responsible for their lifetimes. There's a fair amount of hacks and band-aids in this patch, and we'll have a lot of cleanup to do after this.
This commit is contained in:
parent
bb547ce1c4
commit
6f433c8656
445 changed files with 4797 additions and 4268 deletions
|
@ -16,10 +16,9 @@
|
|||
namespace Web::CSS {
|
||||
|
||||
class CSSRule : public Bindings::PlatformObject {
|
||||
JS_OBJECT(CSSRule, JS::Object);
|
||||
WEB_PLATFORM_OBJECT(CSSRule, JS::Object);
|
||||
|
||||
public:
|
||||
CSSRule& impl() { return *this; }
|
||||
virtual ~CSSRule() = default;
|
||||
|
||||
// https://drafts.csswg.org/cssom/#dom-cssrule-type
|
||||
|
@ -46,7 +45,7 @@ public:
|
|||
bool fast_is() const = delete;
|
||||
|
||||
protected:
|
||||
explicit CSSRule(Bindings::WindowObject&);
|
||||
explicit CSSRule(HTML::Window&);
|
||||
|
||||
virtual String serialized() const = 0;
|
||||
|
||||
|
@ -58,7 +57,4 @@ protected:
|
|||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::CSS::CSSRule& object) { return &object; }
|
||||
using CSSRuleWrapper = Web::CSS::CSSRule;
|
||||
}
|
||||
WRAPPER_HACK(CSSRule, Web::CSS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue