diff --git a/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp b/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp index 7ecde4ec502..b16a46ec417 100644 --- a/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp +++ b/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp @@ -14,6 +14,8 @@ namespace Web::Bindings { +JS_DEFINE_ALLOCATOR(AudioConstructor); + AudioConstructor::AudioConstructor(JS::Realm& realm) : NativeFunction(realm.intrinsics().function_prototype()) { diff --git a/Userland/Libraries/LibWeb/Bindings/AudioConstructor.h b/Userland/Libraries/LibWeb/Bindings/AudioConstructor.h index 85f464da7b6..bc1f3e70b41 100644 --- a/Userland/Libraries/LibWeb/Bindings/AudioConstructor.h +++ b/Userland/Libraries/LibWeb/Bindings/AudioConstructor.h @@ -12,6 +12,9 @@ namespace Web::Bindings { class AudioConstructor final : public JS::NativeFunction { + JS_OBJECT(AudioConstructor, JS::NativeFunction); + JS_DECLARE_ALLOCATOR(AudioConstructor); + public: explicit AudioConstructor(JS::Realm&); virtual void initialize(JS::Realm&) override; @@ -22,7 +25,6 @@ public: private: virtual bool has_constructor() const override { return true; } - virtual StringView class_name() const override { return "AudioConstructor"sv; } }; } diff --git a/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp b/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp index 7250798928b..7bb9ae757a0 100644 --- a/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp +++ b/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp @@ -14,6 +14,8 @@ namespace Web::Bindings { +JS_DEFINE_ALLOCATOR(ImageConstructor); + ImageConstructor::ImageConstructor(JS::Realm& realm) : NativeFunction(realm.intrinsics().function_prototype()) { diff --git a/Userland/Libraries/LibWeb/Bindings/ImageConstructor.h b/Userland/Libraries/LibWeb/Bindings/ImageConstructor.h index a5b5f058d98..4c08de4ca5a 100644 --- a/Userland/Libraries/LibWeb/Bindings/ImageConstructor.h +++ b/Userland/Libraries/LibWeb/Bindings/ImageConstructor.h @@ -12,6 +12,9 @@ namespace Web::Bindings { class ImageConstructor final : public JS::NativeFunction { + JS_OBJECT(ImageConstructor, JS::NativeFunction); + JS_DECLARE_ALLOCATOR(ImageConstructor); + public: explicit ImageConstructor(JS::Realm&); virtual void initialize(JS::Realm&) override; @@ -22,7 +25,6 @@ public: private: virtual bool has_constructor() const override { return true; } - virtual StringView class_name() const override { return "ImageConstructor"sv; } }; } diff --git a/Userland/Libraries/LibWeb/Bindings/OptionConstructor.cpp b/Userland/Libraries/LibWeb/Bindings/OptionConstructor.cpp index a638213b2ea..4e19d3f8a33 100644 --- a/Userland/Libraries/LibWeb/Bindings/OptionConstructor.cpp +++ b/Userland/Libraries/LibWeb/Bindings/OptionConstructor.cpp @@ -17,6 +17,8 @@ namespace Web::Bindings { +JS_DEFINE_ALLOCATOR(OptionConstructor); + OptionConstructor::OptionConstructor(JS::Realm& realm) : NativeFunction(realm.intrinsics().function_prototype()) { diff --git a/Userland/Libraries/LibWeb/Bindings/OptionConstructor.h b/Userland/Libraries/LibWeb/Bindings/OptionConstructor.h index a212ddb398d..c9471e828eb 100644 --- a/Userland/Libraries/LibWeb/Bindings/OptionConstructor.h +++ b/Userland/Libraries/LibWeb/Bindings/OptionConstructor.h @@ -12,6 +12,9 @@ namespace Web::Bindings { class OptionConstructor final : public JS::NativeFunction { + JS_OBJECT(OptionConstructor, JS::NativeFunction); + JS_DECLARE_ALLOCATOR(OptionConstructor); + public: explicit OptionConstructor(JS::Realm&); virtual void initialize(JS::Realm&) override; @@ -22,7 +25,6 @@ public: private: virtual bool has_constructor() const override { return true; } - virtual StringView class_name() const override { return "OptionConstructor"sv; } }; } diff --git a/Userland/Libraries/LibWeb/CSS/AnimationEvent.cpp b/Userland/Libraries/LibWeb/CSS/AnimationEvent.cpp index aeadc1b694b..83e644b62f8 100644 --- a/Userland/Libraries/LibWeb/CSS/AnimationEvent.cpp +++ b/Userland/Libraries/LibWeb/CSS/AnimationEvent.cpp @@ -9,6 +9,8 @@ namespace Web::CSS { +JS_DEFINE_ALLOCATOR(AnimationEvent); + JS::NonnullGCPtr AnimationEvent::create(JS::Realm& realm, FlyString const& type, AnimationEventInit const& event_init) { return realm.heap().allocate(realm, realm, type, event_init); diff --git a/Userland/Libraries/LibWeb/CSS/AnimationEvent.h b/Userland/Libraries/LibWeb/CSS/AnimationEvent.h index d3986f2cf56..e93d4113253 100644 --- a/Userland/Libraries/LibWeb/CSS/AnimationEvent.h +++ b/Userland/Libraries/LibWeb/CSS/AnimationEvent.h @@ -21,6 +21,7 @@ struct AnimationEventInit : public DOM::EventInit { // https://www.w3.org/TR/css-animations-1/#animationevent class AnimationEvent : public DOM::Event { WEB_PLATFORM_OBJECT(AnimationEvent, DOM::Event); + JS_DECLARE_ALLOCATOR(AnimationEvent); public: [[nodiscard]] static JS::NonnullGCPtr create(JS::Realm&, FlyString const& type, AnimationEventInit const& event_init = {}); diff --git a/Userland/Libraries/LibWeb/CSS/CSSAnimation.cpp b/Userland/Libraries/LibWeb/CSS/CSSAnimation.cpp index f56afa98c85..1c22b5c90fa 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSAnimation.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSAnimation.cpp @@ -11,6 +11,8 @@ namespace Web::CSS { +JS_DEFINE_ALLOCATOR(CSSAnimation); + JS::NonnullGCPtr CSSAnimation::create(JS::Realm& realm) { return realm.heap().allocate(realm, realm); diff --git a/Userland/Libraries/LibWeb/CSS/CSSAnimation.h b/Userland/Libraries/LibWeb/CSS/CSSAnimation.h index 3ea5a993ea7..638dfef555a 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSAnimation.h +++ b/Userland/Libraries/LibWeb/CSS/CSSAnimation.h @@ -15,6 +15,7 @@ namespace Web::CSS { // https://www.w3.org/TR/css-animations-2/#cssanimation class CSSAnimation : public Animations::Animation { WEB_PLATFORM_OBJECT(CSSAnimation, Animations::Animation); + JS_DECLARE_ALLOCATOR(CSSAnimation); public: static JS::NonnullGCPtr create(JS::Realm&); diff --git a/Userland/Libraries/LibWeb/CSS/CSSTransition.cpp b/Userland/Libraries/LibWeb/CSS/CSSTransition.cpp index 5953dfbbbff..ef3eeb339af 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSTransition.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSTransition.cpp @@ -11,6 +11,8 @@ namespace Web::CSS { +JS_DEFINE_ALLOCATOR(CSSTransition); + JS::NonnullGCPtr CSSTransition::create(JS::Realm& realm, PropertyID property_id, size_t transition_generation) { return realm.heap().allocate(realm, realm, property_id, transition_generation); diff --git a/Userland/Libraries/LibWeb/CSS/CSSTransition.h b/Userland/Libraries/LibWeb/CSS/CSSTransition.h index 78557754978..1871b44f62e 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSTransition.h +++ b/Userland/Libraries/LibWeb/CSS/CSSTransition.h @@ -16,6 +16,7 @@ namespace Web::CSS { class CSSTransition : public Animations::Animation { WEB_PLATFORM_OBJECT(CSSTransition, Animations::Animation); + JS_DECLARE_ALLOCATOR(CSSTransition); public: static JS::NonnullGCPtr create(JS::Realm&, PropertyID, size_t transition_generation); diff --git a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp index 10520ce16ab..e82471259cc 100644 --- a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp +++ b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp @@ -38,6 +38,8 @@ namespace Web::DOM { +JS_DEFINE_ALLOCATOR(EventTarget); + EventTarget::EventTarget(JS::Realm& realm, MayInterfereWithIndexedPropertyAccess may_interfere_with_indexed_property_access) : PlatformObject(realm, may_interfere_with_indexed_property_access) { diff --git a/Userland/Libraries/LibWeb/DOM/EventTarget.h b/Userland/Libraries/LibWeb/DOM/EventTarget.h index 5ebea603b4f..4452078a716 100644 --- a/Userland/Libraries/LibWeb/DOM/EventTarget.h +++ b/Userland/Libraries/LibWeb/DOM/EventTarget.h @@ -19,6 +19,7 @@ namespace Web::DOM { class EventTarget : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(EventTarget, Bindings::PlatformObject); + JS_DECLARE_ALLOCATOR(EventTarget); public: virtual ~EventTarget() override; diff --git a/Userland/Libraries/LibWeb/DOM/IDLEventListener.cpp b/Userland/Libraries/LibWeb/DOM/IDLEventListener.cpp index 45a9e96b578..98d7f9d8471 100644 --- a/Userland/Libraries/LibWeb/DOM/IDLEventListener.cpp +++ b/Userland/Libraries/LibWeb/DOM/IDLEventListener.cpp @@ -10,6 +10,8 @@ namespace Web::DOM { +JS_DEFINE_ALLOCATOR(IDLEventListener); + JS::NonnullGCPtr IDLEventListener::create(JS::Realm& realm, JS::NonnullGCPtr callback) { return realm.heap().allocate(realm, realm, move(callback)); diff --git a/Userland/Libraries/LibWeb/DOM/IDLEventListener.h b/Userland/Libraries/LibWeb/DOM/IDLEventListener.h index 4305919939d..60ef1defc0b 100644 --- a/Userland/Libraries/LibWeb/DOM/IDLEventListener.h +++ b/Userland/Libraries/LibWeb/DOM/IDLEventListener.h @@ -26,6 +26,7 @@ struct AddEventListenerOptions : public EventListenerOptions { class IDLEventListener final : public JS::Object { JS_OBJECT(IDLEventListener, JS::Object); + JS_DECLARE_ALLOCATOR(IDLEventListener); public: [[nodiscard]] static JS::NonnullGCPtr create(JS::Realm&, JS::NonnullGCPtr); diff --git a/Userland/Libraries/LibWeb/DOM/MutationObserver.cpp b/Userland/Libraries/LibWeb/DOM/MutationObserver.cpp index b1bffc92ade..57dc3076161 100644 --- a/Userland/Libraries/LibWeb/DOM/MutationObserver.cpp +++ b/Userland/Libraries/LibWeb/DOM/MutationObserver.cpp @@ -12,6 +12,7 @@ namespace Web::DOM { JS_DEFINE_ALLOCATOR(MutationObserver); +JS_DEFINE_ALLOCATOR(TransientRegisteredObserver); WebIDL::ExceptionOr> MutationObserver::construct_impl(JS::Realm& realm, JS::GCPtr callback) { diff --git a/Userland/Libraries/LibWeb/DOM/MutationObserver.h b/Userland/Libraries/LibWeb/DOM/MutationObserver.h index dae9ba3d1e4..176af145de6 100644 --- a/Userland/Libraries/LibWeb/DOM/MutationObserver.h +++ b/Userland/Libraries/LibWeb/DOM/MutationObserver.h @@ -93,6 +93,7 @@ private: // https://dom.spec.whatwg.org/#transient-registered-observer class TransientRegisteredObserver final : public RegisteredObserver { JS_CELL(TransientRegisteredObserver, RegisteredObserver); + JS_DECLARE_ALLOCATOR(TransientRegisteredObserver); public: static JS::NonnullGCPtr create(MutationObserver&, MutationObserverInit const&, RegisteredObserver& source); diff --git a/Userland/Libraries/LibWeb/DOM/ParentNode.cpp b/Userland/Libraries/LibWeb/DOM/ParentNode.cpp index 7a01a9c3e15..a009ffe56dd 100644 --- a/Userland/Libraries/LibWeb/DOM/ParentNode.cpp +++ b/Userland/Libraries/LibWeb/DOM/ParentNode.cpp @@ -19,6 +19,8 @@ namespace Web::DOM { +JS_DEFINE_ALLOCATOR(ParentNode); + // https://dom.spec.whatwg.org/#dom-parentnode-queryselector WebIDL::ExceptionOr> ParentNode::query_selector(StringView selector_text) { diff --git a/Userland/Libraries/LibWeb/DOM/ParentNode.h b/Userland/Libraries/LibWeb/DOM/ParentNode.h index c1d8a419ab0..a84d23d07a6 100644 --- a/Userland/Libraries/LibWeb/DOM/ParentNode.h +++ b/Userland/Libraries/LibWeb/DOM/ParentNode.h @@ -12,6 +12,7 @@ namespace Web::DOM { class ParentNode : public Node { WEB_PLATFORM_OBJECT(ParentNode, Node); + JS_DECLARE_ALLOCATOR(ParentNode); public: template diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.cpp b/Userland/Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.cpp index 562ad4ff9d3..c4e4c2eae77 100644 --- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.cpp @@ -10,6 +10,8 @@ namespace Web::Fetch::Infrastructure { +JS_DEFINE_ALLOCATOR(FetchTimingInfo); + FetchTimingInfo::FetchTimingInfo() = default; JS::NonnullGCPtr FetchTimingInfo::create(JS::VM& vm) diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.h b/Userland/Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.h index a1d6fff66c6..05a52d634d0 100644 --- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.h +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.h @@ -19,6 +19,7 @@ namespace Web::Fetch::Infrastructure { // https://fetch.spec.whatwg.org/#fetch-timing-info class FetchTimingInfo : public JS::Cell { JS_CELL(FetchTimingInfo, JS::Cell); + JS_DECLARE_ALLOCATOR(FetchTimingInfo); public: [[nodiscard]] static JS::NonnullGCPtr create(JS::VM&); diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.cpp b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.cpp index eff62554797..0d4c9d994ff 100644 --- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.cpp @@ -25,6 +25,8 @@ namespace Web::Fetch::Infrastructure { +JS_DEFINE_ALLOCATOR(HeaderList); + template requires(IsSameIgnoringCV) struct CaseInsensitiveBytesTraits : public Traits> { static constexpr bool equals(Span const& a, Span const& b) diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h index 85d98746709..4b7436c22ee 100644 --- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h @@ -14,8 +14,8 @@ #include #include #include -#include #include +#include #include namespace Web::Fetch::Infrastructure { @@ -35,6 +35,7 @@ class HeaderList final : public JS::Cell , Vector
{ JS_CELL(HeaderList, JS::Cell); + JS_DECLARE_ALLOCATOR(HeaderList); public: using Vector::begin; diff --git a/Userland/Libraries/LibWeb/Geometry/DOMMatrixReadOnly.cpp b/Userland/Libraries/LibWeb/Geometry/DOMMatrixReadOnly.cpp index 00b0f96b73f..2ac0c7dfa50 100644 --- a/Userland/Libraries/LibWeb/Geometry/DOMMatrixReadOnly.cpp +++ b/Userland/Libraries/LibWeb/Geometry/DOMMatrixReadOnly.cpp @@ -20,6 +20,8 @@ namespace Web::Geometry { +JS_DEFINE_ALLOCATOR(DOMMatrixReadOnly); + // https://drafts.fxtf.org/geometry/#dom-dommatrixreadonly-dommatrixreadonly WebIDL::ExceptionOr> DOMMatrixReadOnly::construct_impl(JS::Realm& realm, Optional>> const& init) { diff --git a/Userland/Libraries/LibWeb/Geometry/DOMMatrixReadOnly.h b/Userland/Libraries/LibWeb/Geometry/DOMMatrixReadOnly.h index f779da523c0..f69b9850cda 100644 --- a/Userland/Libraries/LibWeb/Geometry/DOMMatrixReadOnly.h +++ b/Userland/Libraries/LibWeb/Geometry/DOMMatrixReadOnly.h @@ -52,6 +52,7 @@ class DOMMatrixReadOnly : public Bindings::PlatformObject , public Bindings::Serializable { WEB_PLATFORM_OBJECT(DOMMatrixReadOnly, Bindings::PlatformObject); + JS_DECLARE_ALLOCATOR(DOMMatrixReadOnly); public: static WebIDL::ExceptionOr> construct_impl(JS::Realm&, Optional>> const& init); diff --git a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp index 7819878a4a4..27a8a0d4424 100644 --- a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp +++ b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp @@ -21,6 +21,8 @@ namespace Web::HTML { +JS_DEFINE_ALLOCATOR(EventLoop); + EventLoop::EventLoop() { m_task_queue = heap().allocate_without_realm(*this); diff --git a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.h b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.h index 4bd953bd2f9..ebb4a794cdb 100644 --- a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.h +++ b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.h @@ -17,6 +17,7 @@ namespace Web::HTML { class EventLoop : public JS::Cell { JS_CELL(EventLoop, Cell); + JS_DECLARE_ALLOCATOR(EventLoop); public: enum class Type { diff --git a/Userland/Libraries/LibWeb/HTML/EventLoop/TaskQueue.cpp b/Userland/Libraries/LibWeb/HTML/EventLoop/TaskQueue.cpp index 828105299a0..8cea970cc5f 100644 --- a/Userland/Libraries/LibWeb/HTML/EventLoop/TaskQueue.cpp +++ b/Userland/Libraries/LibWeb/HTML/EventLoop/TaskQueue.cpp @@ -10,6 +10,8 @@ namespace Web::HTML { +JS_DEFINE_ALLOCATOR(TaskQueue); + TaskQueue::TaskQueue(HTML::EventLoop& event_loop) : m_event_loop(event_loop) { diff --git a/Userland/Libraries/LibWeb/HTML/EventLoop/TaskQueue.h b/Userland/Libraries/LibWeb/HTML/EventLoop/TaskQueue.h index ba1ff5ac96e..7bf230e4102 100644 --- a/Userland/Libraries/LibWeb/HTML/EventLoop/TaskQueue.h +++ b/Userland/Libraries/LibWeb/HTML/EventLoop/TaskQueue.h @@ -14,6 +14,7 @@ namespace Web::HTML { class TaskQueue : public JS::Cell { JS_CELL(TaskQueue, Cell); + JS_DECLARE_ALLOCATOR(TaskQueue); public: explicit TaskQueue(HTML::EventLoop&); diff --git a/Userland/Libraries/LibWeb/HTML/Navigation.cpp b/Userland/Libraries/LibWeb/HTML/Navigation.cpp index 55f11d3f07a..c8b9bdc0d26 100644 --- a/Userland/Libraries/LibWeb/HTML/Navigation.cpp +++ b/Userland/Libraries/LibWeb/HTML/Navigation.cpp @@ -31,6 +31,7 @@ namespace Web::HTML { JS_DEFINE_ALLOCATOR(Navigation); +JS_DEFINE_ALLOCATOR(NavigationAPIMethodTracker); static NavigationResult navigation_api_method_tracker_derived_result(JS::NonnullGCPtr api_method_tracker); diff --git a/Userland/Libraries/LibWeb/HTML/Navigation.h b/Userland/Libraries/LibWeb/HTML/Navigation.h index cdef9be2a28..25319147e18 100644 --- a/Userland/Libraries/LibWeb/HTML/Navigation.h +++ b/Userland/Libraries/LibWeb/HTML/Navigation.h @@ -47,6 +47,7 @@ struct NavigationResult { // https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-api-method-tracker struct NavigationAPIMethodTracker final : public JS::Cell { JS_CELL(NavigationAPIMethodTracker, JS::Cell); + JS_DECLARE_ALLOCATOR(NavigationAPIMethodTracker); NavigationAPIMethodTracker(JS::NonnullGCPtr navigation, Optional key, diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp b/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp index 7b4433096f7..beefc4b3f29 100644 --- a/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp +++ b/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp @@ -28,6 +28,8 @@ namespace Web::HTML { +JS_DEFINE_ALLOCATOR(FetchContext); + OnFetchScriptComplete create_on_fetch_script_complete(JS::Heap& heap, Function)> function) { return JS::create_heap_function(heap, move(function)); diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.h b/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.h index 2c9b3a575cd..87694ee1038 100644 --- a/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.h +++ b/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.h @@ -56,6 +56,7 @@ ScriptFetchOptions default_classic_script_fetch_options(); class FetchContext : public JS::GraphLoadingState::HostDefined { JS_CELL(FetchContext, JS::GraphLoadingState::HostDefined); + JS_DECLARE_ALLOCATOR(FetchContext); public: JS::Value parse_error; // [[ParseError]] diff --git a/Userland/Libraries/LibWeb/Layout/AudioBox.cpp b/Userland/Libraries/LibWeb/Layout/AudioBox.cpp index 3301345b7c4..bf662af57a4 100644 --- a/Userland/Libraries/LibWeb/Layout/AudioBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/AudioBox.cpp @@ -10,6 +10,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(AudioBox); + AudioBox::AudioBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr style) : ReplacedBox(document, element, move(style)) { diff --git a/Userland/Libraries/LibWeb/Layout/AudioBox.h b/Userland/Libraries/LibWeb/Layout/AudioBox.h index f8f62678887..326f3de34f9 100644 --- a/Userland/Libraries/LibWeb/Layout/AudioBox.h +++ b/Userland/Libraries/LibWeb/Layout/AudioBox.h @@ -14,6 +14,7 @@ namespace Web::Layout { class AudioBox final : public ReplacedBox { JS_CELL(AudioBox, ReplacedBox); + JS_DECLARE_ALLOCATOR(AudioBox); public: HTML::HTMLAudioElement& dom_node(); diff --git a/Userland/Libraries/LibWeb/Layout/BreakNode.cpp b/Userland/Libraries/LibWeb/Layout/BreakNode.cpp index cb4c9cd9e5b..d5f2dda2e0e 100644 --- a/Userland/Libraries/LibWeb/Layout/BreakNode.cpp +++ b/Userland/Libraries/LibWeb/Layout/BreakNode.cpp @@ -10,6 +10,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(BreakNode); + BreakNode::BreakNode(DOM::Document& document, HTML::HTMLBRElement& element, NonnullRefPtr style) : Layout::NodeWithStyleAndBoxModelMetrics(document, &element, move(style)) { diff --git a/Userland/Libraries/LibWeb/Layout/BreakNode.h b/Userland/Libraries/LibWeb/Layout/BreakNode.h index 6e4a1063aea..57a23c1d808 100644 --- a/Userland/Libraries/LibWeb/Layout/BreakNode.h +++ b/Userland/Libraries/LibWeb/Layout/BreakNode.h @@ -13,6 +13,7 @@ namespace Web::Layout { class BreakNode final : public NodeWithStyleAndBoxModelMetrics { JS_CELL(BreakNode, NodeWithStyleAndBoxModelMetrics); + JS_DECLARE_ALLOCATOR(BreakNode); public: BreakNode(DOM::Document&, HTML::HTMLBRElement&, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/ButtonBox.cpp b/Userland/Libraries/LibWeb/Layout/ButtonBox.cpp index d578ac8f1a3..4f6369d001c 100644 --- a/Userland/Libraries/LibWeb/Layout/ButtonBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/ButtonBox.cpp @@ -11,6 +11,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(ButtonBox); + ButtonBox::ButtonBox(DOM::Document& document, HTML::HTMLInputElement& element, NonnullRefPtr style) : FormAssociatedLabelableNode(document, element, move(style)) { diff --git a/Userland/Libraries/LibWeb/Layout/ButtonBox.h b/Userland/Libraries/LibWeb/Layout/ButtonBox.h index b8790c39f4a..de2dcaf75ad 100644 --- a/Userland/Libraries/LibWeb/Layout/ButtonBox.h +++ b/Userland/Libraries/LibWeb/Layout/ButtonBox.h @@ -13,6 +13,7 @@ namespace Web::Layout { class ButtonBox final : public FormAssociatedLabelableNode { JS_CELL(ButtonBox, FormAssociatedLabelableNode); + JS_DECLARE_ALLOCATOR(ButtonBox); public: ButtonBox(DOM::Document&, HTML::HTMLInputElement&, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/CanvasBox.cpp b/Userland/Libraries/LibWeb/Layout/CanvasBox.cpp index df053968130..2d4c9239e1f 100644 --- a/Userland/Libraries/LibWeb/Layout/CanvasBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/CanvasBox.cpp @@ -9,6 +9,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(CanvasBox); + CanvasBox::CanvasBox(DOM::Document& document, HTML::HTMLCanvasElement& element, NonnullRefPtr style) : ReplacedBox(document, element, move(style)) { diff --git a/Userland/Libraries/LibWeb/Layout/CanvasBox.h b/Userland/Libraries/LibWeb/Layout/CanvasBox.h index 30ab9e581db..566a250386f 100644 --- a/Userland/Libraries/LibWeb/Layout/CanvasBox.h +++ b/Userland/Libraries/LibWeb/Layout/CanvasBox.h @@ -13,6 +13,7 @@ namespace Web::Layout { class CanvasBox final : public ReplacedBox { JS_CELL(CanvasBox, ReplacedBox); + JS_DECLARE_ALLOCATOR(CanvasBox); public: CanvasBox(DOM::Document&, HTML::HTMLCanvasElement&, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/CheckBox.cpp b/Userland/Libraries/LibWeb/Layout/CheckBox.cpp index e270d28b7fa..f7c51b36396 100644 --- a/Userland/Libraries/LibWeb/Layout/CheckBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/CheckBox.cpp @@ -13,6 +13,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(CheckBox); + CheckBox::CheckBox(DOM::Document& document, HTML::HTMLInputElement& element, NonnullRefPtr style) : FormAssociatedLabelableNode(document, element, move(style)) { diff --git a/Userland/Libraries/LibWeb/Layout/CheckBox.h b/Userland/Libraries/LibWeb/Layout/CheckBox.h index a7d92fd2b5b..9bc631e476e 100644 --- a/Userland/Libraries/LibWeb/Layout/CheckBox.h +++ b/Userland/Libraries/LibWeb/Layout/CheckBox.h @@ -13,6 +13,7 @@ namespace Web::Layout { class CheckBox final : public FormAssociatedLabelableNode { JS_CELL(CheckBox, FormAssociatedLabelableNode); + JS_DECLARE_ALLOCATOR(CheckBox); public: CheckBox(DOM::Document&, HTML::HTMLInputElement&, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/FrameBox.cpp b/Userland/Libraries/LibWeb/Layout/FrameBox.cpp index abe6ed85c55..b0c1d3287bb 100644 --- a/Userland/Libraries/LibWeb/Layout/FrameBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/FrameBox.cpp @@ -11,6 +11,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(FrameBox); + FrameBox::FrameBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr style) : ReplacedBox(document, element, move(style)) { diff --git a/Userland/Libraries/LibWeb/Layout/FrameBox.h b/Userland/Libraries/LibWeb/Layout/FrameBox.h index 0dec7b0a8b6..fd694c2dea1 100644 --- a/Userland/Libraries/LibWeb/Layout/FrameBox.h +++ b/Userland/Libraries/LibWeb/Layout/FrameBox.h @@ -13,6 +13,7 @@ namespace Web::Layout { class FrameBox final : public ReplacedBox { JS_CELL(FrameBox, ReplacedBox); + JS_DECLARE_ALLOCATOR(FrameBox); public: FrameBox(DOM::Document&, DOM::Element&, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/ImageBox.cpp b/Userland/Libraries/LibWeb/Layout/ImageBox.cpp index b28d12b2fcb..338b8f995be 100644 --- a/Userland/Libraries/LibWeb/Layout/ImageBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/ImageBox.cpp @@ -14,6 +14,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(ImageBox); + ImageBox::ImageBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr style, ImageProvider const& image_provider) : ReplacedBox(document, element, move(style)) , m_image_provider(image_provider) diff --git a/Userland/Libraries/LibWeb/Layout/ImageBox.h b/Userland/Libraries/LibWeb/Layout/ImageBox.h index 93d91a65a20..7ae100bd752 100644 --- a/Userland/Libraries/LibWeb/Layout/ImageBox.h +++ b/Userland/Libraries/LibWeb/Layout/ImageBox.h @@ -13,6 +13,7 @@ namespace Web::Layout { class ImageBox final : public ReplacedBox { JS_CELL(ImageBox, ReplacedBox); + JS_DECLARE_ALLOCATOR(ImageBox); public: ImageBox(DOM::Document&, DOM::Element&, NonnullRefPtr, ImageProvider const&); diff --git a/Userland/Libraries/LibWeb/Layout/InlineNode.cpp b/Userland/Libraries/LibWeb/Layout/InlineNode.cpp index a630a45e269..5cde6255fd7 100644 --- a/Userland/Libraries/LibWeb/Layout/InlineNode.cpp +++ b/Userland/Libraries/LibWeb/Layout/InlineNode.cpp @@ -14,6 +14,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(InlineNode); + InlineNode::InlineNode(DOM::Document& document, DOM::Element* element, NonnullRefPtr style) : Layout::NodeWithStyleAndBoxModelMetrics(document, element, move(style)) { diff --git a/Userland/Libraries/LibWeb/Layout/InlineNode.h b/Userland/Libraries/LibWeb/Layout/InlineNode.h index ce067ce7613..4e21ab82870 100644 --- a/Userland/Libraries/LibWeb/Layout/InlineNode.h +++ b/Userland/Libraries/LibWeb/Layout/InlineNode.h @@ -12,6 +12,7 @@ namespace Web::Layout { class InlineNode final : public NodeWithStyleAndBoxModelMetrics { JS_CELL(InlineNode, NodeWithStyleAndBoxModelMetrics); + JS_DECLARE_ALLOCATOR(InlineNode); public: InlineNode(DOM::Document&, DOM::Element*, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/Label.cpp b/Userland/Libraries/LibWeb/Layout/Label.cpp index 78f94ae14e4..533506a9804 100644 --- a/Userland/Libraries/LibWeb/Layout/Label.cpp +++ b/Userland/Libraries/LibWeb/Layout/Label.cpp @@ -15,6 +15,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(Label); + Label::Label(DOM::Document& document, HTML::HTMLLabelElement* element, NonnullRefPtr style) : BlockContainer(document, element, move(style)) { diff --git a/Userland/Libraries/LibWeb/Layout/Label.h b/Userland/Libraries/LibWeb/Layout/Label.h index d17b6422038..e11a07fcc52 100644 --- a/Userland/Libraries/LibWeb/Layout/Label.h +++ b/Userland/Libraries/LibWeb/Layout/Label.h @@ -13,6 +13,7 @@ namespace Web::Layout { class Label final : public BlockContainer { JS_CELL(Label, BlockContainer); + JS_DECLARE_ALLOCATOR(Label); public: Label(DOM::Document&, HTML::HTMLLabelElement*, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/ListItemBox.cpp b/Userland/Libraries/LibWeb/Layout/ListItemBox.cpp index 29f70350396..0dfa499f1e7 100644 --- a/Userland/Libraries/LibWeb/Layout/ListItemBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/ListItemBox.cpp @@ -10,6 +10,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(ListItemBox); + ListItemBox::ListItemBox(DOM::Document& document, DOM::Element* element, NonnullRefPtr style) : Layout::BlockContainer(document, element, move(style)) { diff --git a/Userland/Libraries/LibWeb/Layout/ListItemBox.h b/Userland/Libraries/LibWeb/Layout/ListItemBox.h index 7f4598b398a..c05f2c88126 100644 --- a/Userland/Libraries/LibWeb/Layout/ListItemBox.h +++ b/Userland/Libraries/LibWeb/Layout/ListItemBox.h @@ -13,6 +13,7 @@ namespace Web::Layout { class ListItemBox final : public BlockContainer { JS_CELL(ListItemBox, BlockContainer); + JS_DECLARE_ALLOCATOR(ListItemBox); public: ListItemBox(DOM::Document&, DOM::Element*, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/ListItemMarkerBox.cpp b/Userland/Libraries/LibWeb/Layout/ListItemMarkerBox.cpp index a7686dd461b..ea11ffe032d 100644 --- a/Userland/Libraries/LibWeb/Layout/ListItemMarkerBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/ListItemMarkerBox.cpp @@ -10,6 +10,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(ListItemMarkerBox); + ListItemMarkerBox::ListItemMarkerBox(DOM::Document& document, CSS::ListStyleType style_type, CSS::ListStylePosition style_position, size_t index, NonnullRefPtr style) : Box(document, nullptr, move(style)) , m_list_style_type(style_type) diff --git a/Userland/Libraries/LibWeb/Layout/ListItemMarkerBox.h b/Userland/Libraries/LibWeb/Layout/ListItemMarkerBox.h index aa72b0ead05..66f730fb691 100644 --- a/Userland/Libraries/LibWeb/Layout/ListItemMarkerBox.h +++ b/Userland/Libraries/LibWeb/Layout/ListItemMarkerBox.h @@ -13,6 +13,7 @@ namespace Web::Layout { class ListItemMarkerBox final : public Box { JS_CELL(ListItemMarkerBox, Box); + JS_DECLARE_ALLOCATOR(ListItemMarkerBox); public: explicit ListItemMarkerBox(DOM::Document&, CSS::ListStyleType, CSS::ListStylePosition, size_t index, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/RadioButton.cpp b/Userland/Libraries/LibWeb/Layout/RadioButton.cpp index 7ec815b0365..362a3bb50ab 100644 --- a/Userland/Libraries/LibWeb/Layout/RadioButton.cpp +++ b/Userland/Libraries/LibWeb/Layout/RadioButton.cpp @@ -11,6 +11,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(RadioButton); + RadioButton::RadioButton(DOM::Document& document, HTML::HTMLInputElement& element, NonnullRefPtr style) : FormAssociatedLabelableNode(document, element, move(style)) { diff --git a/Userland/Libraries/LibWeb/Layout/RadioButton.h b/Userland/Libraries/LibWeb/Layout/RadioButton.h index 6bbb135bb95..9fc315169cb 100644 --- a/Userland/Libraries/LibWeb/Layout/RadioButton.h +++ b/Userland/Libraries/LibWeb/Layout/RadioButton.h @@ -13,6 +13,7 @@ namespace Web::Layout { class RadioButton final : public FormAssociatedLabelableNode { JS_CELL(RadioButton, FormAssociatedLabelableNode); + JS_DECLARE_ALLOCATOR(RadioButton); public: RadioButton(DOM::Document&, HTML::HTMLInputElement&, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/SVGClipBox.cpp b/Userland/Libraries/LibWeb/Layout/SVGClipBox.cpp index 9e961e9d9e3..4a1c8968446 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGClipBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/SVGClipBox.cpp @@ -10,6 +10,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(SVGClipBox); + SVGClipBox::SVGClipBox(DOM::Document& document, SVG::SVGClipPathElement& element, NonnullRefPtr properties) : SVGBox(document, element, properties) { diff --git a/Userland/Libraries/LibWeb/Layout/SVGClipBox.h b/Userland/Libraries/LibWeb/Layout/SVGClipBox.h index 95bfc216e6c..db7d20a0f8c 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGClipBox.h +++ b/Userland/Libraries/LibWeb/Layout/SVGClipBox.h @@ -14,6 +14,7 @@ namespace Web::Layout { class SVGClipBox : public SVGBox { JS_CELL(SVGClipBox, SVGBox); + JS_DECLARE_ALLOCATOR(SVGClipBox); public: SVGClipBox(DOM::Document&, SVG::SVGClipPathElement&, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp b/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp index 88b8212787b..c745c5ead20 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp @@ -12,6 +12,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(SVGGeometryBox); + SVGGeometryBox::SVGGeometryBox(DOM::Document& document, SVG::SVGGeometryElement& element, NonnullRefPtr properties) : SVGGraphicsBox(document, element, properties) { diff --git a/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.h b/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.h index 9e198f319ec..c4ce6c63c9c 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.h +++ b/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.h @@ -14,6 +14,7 @@ namespace Web::Layout { class SVGGeometryBox final : public SVGGraphicsBox { JS_CELL(SVGGeometryBox, SVGGraphicsBox); + JS_DECLARE_ALLOCATOR(SVGGeometryBox); public: SVGGeometryBox(DOM::Document&, SVG::SVGGeometryElement&, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/SVGMaskBox.cpp b/Userland/Libraries/LibWeb/Layout/SVGMaskBox.cpp index c76c1c57d78..7d6f9bcc147 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGMaskBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/SVGMaskBox.cpp @@ -10,6 +10,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(SVGMaskBox); + SVGMaskBox::SVGMaskBox(DOM::Document& document, SVG::SVGMaskElement& element, NonnullRefPtr properties) : SVGGraphicsBox(document, element, properties) { diff --git a/Userland/Libraries/LibWeb/Layout/SVGMaskBox.h b/Userland/Libraries/LibWeb/Layout/SVGMaskBox.h index f73fccd1cf4..d925f8815d0 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGMaskBox.h +++ b/Userland/Libraries/LibWeb/Layout/SVGMaskBox.h @@ -14,6 +14,7 @@ namespace Web::Layout { class SVGMaskBox : public SVGGraphicsBox { JS_CELL(SVGMaskBox, SVGBox); + JS_DECLARE_ALLOCATOR(SVGMaskBox); public: SVGMaskBox(DOM::Document&, SVG::SVGMaskElement&, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp b/Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp index eb06ffc8e15..a23435fbad3 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp @@ -12,6 +12,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(SVGSVGBox); + SVGSVGBox::SVGSVGBox(DOM::Document& document, SVG::SVGSVGElement& element, NonnullRefPtr properties) : ReplacedBox(document, element, move(properties)) { diff --git a/Userland/Libraries/LibWeb/Layout/SVGSVGBox.h b/Userland/Libraries/LibWeb/Layout/SVGSVGBox.h index ae57bb49801..b52a9d81442 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGSVGBox.h +++ b/Userland/Libraries/LibWeb/Layout/SVGSVGBox.h @@ -13,6 +13,7 @@ namespace Web::Layout { class SVGSVGBox final : public ReplacedBox { JS_CELL(SVGSVGBox, ReplacedBox); + JS_DECLARE_ALLOCATOR(SVGSVGBox); public: SVGSVGBox(DOM::Document&, SVG::SVGSVGElement&, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/SVGTextBox.cpp b/Userland/Libraries/LibWeb/Layout/SVGTextBox.cpp index a9c2bc1af5d..50d9f89a819 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGTextBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/SVGTextBox.cpp @@ -10,6 +10,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(SVGTextBox); + SVGTextBox::SVGTextBox(DOM::Document& document, SVG::SVGTextPositioningElement& element, NonnullRefPtr properties) : SVGGraphicsBox(document, element, properties) { diff --git a/Userland/Libraries/LibWeb/Layout/SVGTextBox.h b/Userland/Libraries/LibWeb/Layout/SVGTextBox.h index 893b96d1e4b..104250daba0 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGTextBox.h +++ b/Userland/Libraries/LibWeb/Layout/SVGTextBox.h @@ -14,6 +14,7 @@ namespace Web::Layout { class SVGTextBox final : public SVGGraphicsBox { JS_CELL(SVGTextBox, SVGGraphicsBox); + JS_DECLARE_ALLOCATOR(SVGTextBox); public: SVGTextBox(DOM::Document&, SVG::SVGTextPositioningElement&, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/SVGTextPathBox.cpp b/Userland/Libraries/LibWeb/Layout/SVGTextPathBox.cpp index 27a096d16a8..58aace23302 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGTextPathBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/SVGTextPathBox.cpp @@ -9,6 +9,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(SVGTextPathBox); + SVGTextPathBox::SVGTextPathBox(DOM::Document& document, SVG::SVGTextPathElement& element, NonnullRefPtr properties) : SVGGraphicsBox(document, element, properties) { diff --git a/Userland/Libraries/LibWeb/Layout/SVGTextPathBox.h b/Userland/Libraries/LibWeb/Layout/SVGTextPathBox.h index b7097d19d80..4f0a0a76616 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGTextPathBox.h +++ b/Userland/Libraries/LibWeb/Layout/SVGTextPathBox.h @@ -13,6 +13,7 @@ namespace Web::Layout { class SVGTextPathBox final : public SVGGraphicsBox { JS_CELL(SVGTextPathBox, SVGGraphicsBox); + JS_DECLARE_ALLOCATOR(SVGTextPathBox); public: SVGTextPathBox(DOM::Document&, SVG::SVGTextPathElement&, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/TableWrapper.cpp b/Userland/Libraries/LibWeb/Layout/TableWrapper.cpp index 8323226cfa4..bdc3bf482ba 100644 --- a/Userland/Libraries/LibWeb/Layout/TableWrapper.cpp +++ b/Userland/Libraries/LibWeb/Layout/TableWrapper.cpp @@ -8,6 +8,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(TableWrapper); + TableWrapper::TableWrapper(DOM::Document& document, DOM::Node* node, NonnullRefPtr style) : BlockContainer(document, node, move(style)) { diff --git a/Userland/Libraries/LibWeb/Layout/TableWrapper.h b/Userland/Libraries/LibWeb/Layout/TableWrapper.h index faa26b8e9f1..2cbb3416260 100644 --- a/Userland/Libraries/LibWeb/Layout/TableWrapper.h +++ b/Userland/Libraries/LibWeb/Layout/TableWrapper.h @@ -12,6 +12,7 @@ namespace Web::Layout { class TableWrapper : public BlockContainer { JS_CELL(TableWrapper, BlockContainer); + JS_DECLARE_ALLOCATOR(TableWrapper); public: TableWrapper(DOM::Document&, DOM::Node*, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Layout/TextNode.cpp b/Userland/Libraries/LibWeb/Layout/TextNode.cpp index 876ecebb6ed..ccba8e6e5c8 100644 --- a/Userland/Libraries/LibWeb/Layout/TextNode.cpp +++ b/Userland/Libraries/LibWeb/Layout/TextNode.cpp @@ -16,6 +16,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(TextNode); + TextNode::TextNode(DOM::Document& document, DOM::Text& text) : Node(document, &text) { diff --git a/Userland/Libraries/LibWeb/Layout/TextNode.h b/Userland/Libraries/LibWeb/Layout/TextNode.h index 0daeb1272e8..6662f9184a3 100644 --- a/Userland/Libraries/LibWeb/Layout/TextNode.h +++ b/Userland/Libraries/LibWeb/Layout/TextNode.h @@ -16,6 +16,7 @@ class LineBoxFragment; class TextNode final : public Node { JS_CELL(TextNode, Node); + JS_DECLARE_ALLOCATOR(TextNode); public: TextNode(DOM::Document&, DOM::Text&); diff --git a/Userland/Libraries/LibWeb/Layout/VideoBox.cpp b/Userland/Libraries/LibWeb/Layout/VideoBox.cpp index 23c8dfa01de..548dca736aa 100644 --- a/Userland/Libraries/LibWeb/Layout/VideoBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/VideoBox.cpp @@ -10,6 +10,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(VideoBox); + VideoBox::VideoBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr style) : ReplacedBox(document, element, move(style)) { diff --git a/Userland/Libraries/LibWeb/Layout/VideoBox.h b/Userland/Libraries/LibWeb/Layout/VideoBox.h index d9ce706714f..03490c04cad 100644 --- a/Userland/Libraries/LibWeb/Layout/VideoBox.h +++ b/Userland/Libraries/LibWeb/Layout/VideoBox.h @@ -16,6 +16,7 @@ class VideoBox final : public ReplacedBox , public DOM::Document::ViewportClient { JS_CELL(VideoBox, ReplacedBox); + JS_DECLARE_ALLOCATOR(VideoBox); public: virtual void prepare_for_replaced_layout() override; diff --git a/Userland/Libraries/LibWeb/Layout/Viewport.cpp b/Userland/Libraries/LibWeb/Layout/Viewport.cpp index 3825840b046..81d97906c2e 100644 --- a/Userland/Libraries/LibWeb/Layout/Viewport.cpp +++ b/Userland/Libraries/LibWeb/Layout/Viewport.cpp @@ -13,6 +13,8 @@ namespace Web::Layout { +JS_DEFINE_ALLOCATOR(Viewport); + Viewport::Viewport(DOM::Document& document, NonnullRefPtr style) : BlockContainer(document, &document, move(style)) { diff --git a/Userland/Libraries/LibWeb/Layout/Viewport.h b/Userland/Libraries/LibWeb/Layout/Viewport.h index dc235d3d3a1..0280ba1a4d7 100644 --- a/Userland/Libraries/LibWeb/Layout/Viewport.h +++ b/Userland/Libraries/LibWeb/Layout/Viewport.h @@ -13,6 +13,7 @@ namespace Web::Layout { class Viewport final : public BlockContainer { JS_CELL(Viewport, BlockContainer); + JS_DECLARE_ALLOCATOR(Viewport); public: explicit Viewport(DOM::Document&, NonnullRefPtr); diff --git a/Userland/Libraries/LibWeb/Page/Page.cpp b/Userland/Libraries/LibWeb/Page/Page.cpp index 13710cd4dfe..20af66847dc 100644 --- a/Userland/Libraries/LibWeb/Page/Page.cpp +++ b/Userland/Libraries/LibWeb/Page/Page.cpp @@ -25,6 +25,8 @@ namespace Web { +JS_DEFINE_ALLOCATOR(Page); + JS::NonnullGCPtr Page::create(JS::VM& vm, JS::NonnullGCPtr page_client) { return vm.heap().allocate_without_realm(page_client); diff --git a/Userland/Libraries/LibWeb/Page/Page.h b/Userland/Libraries/LibWeb/Page/Page.h index 6450a240684..0e337e661bb 100644 --- a/Userland/Libraries/LibWeb/Page/Page.h +++ b/Userland/Libraries/LibWeb/Page/Page.h @@ -22,8 +22,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -47,6 +47,7 @@ class PageClient; class Page final : public JS::Cell { JS_CELL(Page, JS::Cell); + JS_DECLARE_ALLOCATOR(Page); public: static JS::NonnullGCPtr create(JS::VM&, JS::NonnullGCPtr); diff --git a/Userland/Libraries/LibWeb/Painting/AudioPaintable.cpp b/Userland/Libraries/LibWeb/Painting/AudioPaintable.cpp index 338bb61e1d9..9ae335b779d 100644 --- a/Userland/Libraries/LibWeb/Painting/AudioPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/AudioPaintable.cpp @@ -18,6 +18,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(AudioPaintable); + JS::NonnullGCPtr AudioPaintable::create(Layout::AudioBox const& layout_box) { return layout_box.heap().allocate_without_realm(layout_box); diff --git a/Userland/Libraries/LibWeb/Painting/AudioPaintable.h b/Userland/Libraries/LibWeb/Painting/AudioPaintable.h index 5e95e26ce8d..e82dc356c21 100644 --- a/Userland/Libraries/LibWeb/Painting/AudioPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/AudioPaintable.h @@ -13,6 +13,7 @@ namespace Web::Painting { class AudioPaintable final : public MediaPaintable { JS_CELL(AudioPaintable, MediaPaintable); + JS_DECLARE_ALLOCATOR(AudioPaintable); public: static JS::NonnullGCPtr create(Layout::AudioBox const&); diff --git a/Userland/Libraries/LibWeb/Painting/ButtonPaintable.cpp b/Userland/Libraries/LibWeb/Painting/ButtonPaintable.cpp index fd0744d1c0c..71b12a459a3 100644 --- a/Userland/Libraries/LibWeb/Painting/ButtonPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/ButtonPaintable.cpp @@ -13,6 +13,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(ButtonPaintable); + JS::NonnullGCPtr ButtonPaintable::create(Layout::ButtonBox const& layout_box) { return layout_box.heap().allocate_without_realm(layout_box); diff --git a/Userland/Libraries/LibWeb/Painting/ButtonPaintable.h b/Userland/Libraries/LibWeb/Painting/ButtonPaintable.h index ea974b37903..4fa9f39404d 100644 --- a/Userland/Libraries/LibWeb/Painting/ButtonPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/ButtonPaintable.h @@ -13,6 +13,7 @@ namespace Web::Painting { class ButtonPaintable final : public LabelablePaintable { JS_CELL(ButtonPaintable, LabelablePaintable); + JS_DECLARE_ALLOCATOR(ButtonPaintable); public: static JS::NonnullGCPtr create(Layout::ButtonBox const&); diff --git a/Userland/Libraries/LibWeb/Painting/CanvasPaintable.cpp b/Userland/Libraries/LibWeb/Painting/CanvasPaintable.cpp index 94d68f1ea40..92f15298e6d 100644 --- a/Userland/Libraries/LibWeb/Painting/CanvasPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/CanvasPaintable.cpp @@ -8,6 +8,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(CanvasPaintable); + JS::NonnullGCPtr CanvasPaintable::create(Layout::CanvasBox const& layout_box) { return layout_box.heap().allocate_without_realm(layout_box); diff --git a/Userland/Libraries/LibWeb/Painting/CanvasPaintable.h b/Userland/Libraries/LibWeb/Painting/CanvasPaintable.h index 6a867e5c78d..0af1db04013 100644 --- a/Userland/Libraries/LibWeb/Painting/CanvasPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/CanvasPaintable.h @@ -13,6 +13,7 @@ namespace Web::Painting { class CanvasPaintable final : public PaintableBox { JS_CELL(CanvasPaintable, PaintableBox); + JS_DECLARE_ALLOCATOR(CanvasPaintable); public: static JS::NonnullGCPtr create(Layout::CanvasBox const&); diff --git a/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp b/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp index ba22483be45..2cc8d66e664 100644 --- a/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp @@ -18,6 +18,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(CheckBoxPaintable); + // A 16x16 signed distance field for the checkbox's tick (slightly rounded): static constexpr Array s_check_mark_sdf { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 251, 254, 254, 254, diff --git a/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.h b/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.h index 0b9d85cd08a..3b0cd1b055e 100644 --- a/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.h @@ -13,6 +13,7 @@ namespace Web::Painting { class CheckBoxPaintable final : public LabelablePaintable { JS_CELL(CheckBoxPaintable, LabelablePaintable); + JS_DECLARE_ALLOCATOR(CheckBoxPaintable); public: static JS::NonnullGCPtr create(Layout::CheckBox const&); diff --git a/Userland/Libraries/LibWeb/Painting/ImagePaintable.cpp b/Userland/Libraries/LibWeb/Painting/ImagePaintable.cpp index cff8897c9dc..1fd5ac5d1a3 100644 --- a/Userland/Libraries/LibWeb/Painting/ImagePaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/ImagePaintable.cpp @@ -18,6 +18,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(ImagePaintable); + JS::NonnullGCPtr ImagePaintable::create(Layout::ImageBox const& layout_box) { auto alt = layout_box.dom_node().get_attribute_value(HTML::AttributeNames::alt); diff --git a/Userland/Libraries/LibWeb/Painting/ImagePaintable.h b/Userland/Libraries/LibWeb/Painting/ImagePaintable.h index 5dc12a1da86..5eb6929293b 100644 --- a/Userland/Libraries/LibWeb/Painting/ImagePaintable.h +++ b/Userland/Libraries/LibWeb/Painting/ImagePaintable.h @@ -15,6 +15,7 @@ class ImagePaintable final : public PaintableBox , public DOM::Document::ViewportClient { JS_CELL(ImagePaintable, PaintableBox); + JS_DECLARE_ALLOCATOR(ImagePaintable); public: static JS::NonnullGCPtr create(Layout::ImageBox const&); diff --git a/Userland/Libraries/LibWeb/Painting/InlinePaintable.cpp b/Userland/Libraries/LibWeb/Painting/InlinePaintable.cpp index ae3c3114b05..f8cb065eb05 100644 --- a/Userland/Libraries/LibWeb/Painting/InlinePaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/InlinePaintable.cpp @@ -13,6 +13,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(InlinePaintable); + JS::NonnullGCPtr InlinePaintable::create(Layout::InlineNode const& layout_node) { return layout_node.heap().allocate_without_realm(layout_node); diff --git a/Userland/Libraries/LibWeb/Painting/InlinePaintable.h b/Userland/Libraries/LibWeb/Painting/InlinePaintable.h index 1afe78d4bae..dfb6c3f9e5e 100644 --- a/Userland/Libraries/LibWeb/Painting/InlinePaintable.h +++ b/Userland/Libraries/LibWeb/Painting/InlinePaintable.h @@ -14,6 +14,7 @@ namespace Web::Painting { class InlinePaintable final : public Paintable { JS_CELL(InlinePaintable, Paintable); + JS_DECLARE_ALLOCATOR(InlinePaintable); public: static JS::NonnullGCPtr create(Layout::InlineNode const&); diff --git a/Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp b/Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp index 2edae6e3b12..433035b7818 100644 --- a/Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp @@ -12,6 +12,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(MarkerPaintable); + JS::NonnullGCPtr MarkerPaintable::create(Layout::ListItemMarkerBox const& layout_box) { return layout_box.heap().allocate_without_realm(layout_box); diff --git a/Userland/Libraries/LibWeb/Painting/MarkerPaintable.h b/Userland/Libraries/LibWeb/Painting/MarkerPaintable.h index 5f18c6a48f4..a0f3ee31e1a 100644 --- a/Userland/Libraries/LibWeb/Painting/MarkerPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/MarkerPaintable.h @@ -13,6 +13,7 @@ namespace Web::Painting { class MarkerPaintable final : public PaintableBox { JS_CELL(MarkerPaintable, PaintableBox); + JS_DECLARE_ALLOCATOR(MarkerPaintable); public: static JS::NonnullGCPtr create(Layout::ListItemMarkerBox const&); diff --git a/Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp b/Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp index 6850da2c693..ba799c2167f 100644 --- a/Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp @@ -14,6 +14,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(NestedBrowsingContextPaintable); + JS::NonnullGCPtr NestedBrowsingContextPaintable::create(Layout::FrameBox const& layout_box) { return layout_box.heap().allocate_without_realm(layout_box); diff --git a/Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.h b/Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.h index ca0e1bbbb82..8248e8b0202 100644 --- a/Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.h @@ -13,6 +13,7 @@ namespace Web::Painting { class NestedBrowsingContextPaintable final : public PaintableBox { JS_CELL(NestedBrowsingContextPaintable, PaintableBox); + JS_DECLARE_ALLOCATOR(NestedBrowsingContextPaintable); public: static JS::NonnullGCPtr create(Layout::FrameBox const&); diff --git a/Userland/Libraries/LibWeb/Painting/RadioButtonPaintable.cpp b/Userland/Libraries/LibWeb/Painting/RadioButtonPaintable.cpp index c5fe563f00d..cbeadf818a4 100644 --- a/Userland/Libraries/LibWeb/Painting/RadioButtonPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/RadioButtonPaintable.cpp @@ -17,6 +17,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(RadioButtonPaintable); + JS::NonnullGCPtr RadioButtonPaintable::create(Layout::RadioButton const& layout_box) { return layout_box.heap().allocate_without_realm(layout_box); diff --git a/Userland/Libraries/LibWeb/Painting/RadioButtonPaintable.h b/Userland/Libraries/LibWeb/Painting/RadioButtonPaintable.h index a0252b8b364..8a89579689f 100644 --- a/Userland/Libraries/LibWeb/Painting/RadioButtonPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/RadioButtonPaintable.h @@ -13,6 +13,7 @@ namespace Web::Painting { class RadioButtonPaintable final : public LabelablePaintable { JS_CELL(RadioButtonPaintable, LabelablePaintable); + JS_DECLARE_ALLOCATOR(RadioButtonPaintable); public: static JS::NonnullGCPtr create(Layout::RadioButton const&); diff --git a/Userland/Libraries/LibWeb/Painting/SVGClipPaintable.cpp b/Userland/Libraries/LibWeb/Painting/SVGClipPaintable.cpp index 42d1cdcdbe6..f10fab1b445 100644 --- a/Userland/Libraries/LibWeb/Painting/SVGClipPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/SVGClipPaintable.cpp @@ -8,6 +8,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(SVGClipPaintable); + JS::NonnullGCPtr SVGClipPaintable::create(Layout::SVGClipBox const& layout_box) { return layout_box.heap().allocate_without_realm(layout_box); diff --git a/Userland/Libraries/LibWeb/Painting/SVGClipPaintable.h b/Userland/Libraries/LibWeb/Painting/SVGClipPaintable.h index a49d177fe53..198172a4afb 100644 --- a/Userland/Libraries/LibWeb/Painting/SVGClipPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/SVGClipPaintable.h @@ -13,6 +13,7 @@ namespace Web::Painting { class SVGClipPaintable : public SVGPaintable { JS_CELL(SVGClipPaintable, SVGPaintable); + JS_DECLARE_ALLOCATOR(SVGClipPaintable); public: static JS::NonnullGCPtr create(Layout::SVGClipBox const&); diff --git a/Userland/Libraries/LibWeb/Painting/SVGMaskPaintable.cpp b/Userland/Libraries/LibWeb/Painting/SVGMaskPaintable.cpp index 534944f165e..9b1046387a6 100644 --- a/Userland/Libraries/LibWeb/Painting/SVGMaskPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/SVGMaskPaintable.cpp @@ -8,6 +8,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(SVGMaskPaintable); + JS::NonnullGCPtr SVGMaskPaintable::create(Layout::SVGMaskBox const& layout_box) { return layout_box.heap().allocate_without_realm(layout_box); diff --git a/Userland/Libraries/LibWeb/Painting/SVGMaskPaintable.h b/Userland/Libraries/LibWeb/Painting/SVGMaskPaintable.h index b57ab8eaee8..c048d9ccfbf 100644 --- a/Userland/Libraries/LibWeb/Painting/SVGMaskPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/SVGMaskPaintable.h @@ -13,6 +13,7 @@ namespace Web::Painting { class SVGMaskPaintable : public SVGGraphicsPaintable { JS_CELL(SVGMaskPaintable, SVGGraphicsPaintable); + JS_DECLARE_ALLOCATOR(SVGMaskPaintable); public: static JS::NonnullGCPtr create(Layout::SVGMaskBox const&); diff --git a/Userland/Libraries/LibWeb/Painting/SVGPathPaintable.cpp b/Userland/Libraries/LibWeb/Painting/SVGPathPaintable.cpp index ebd55295c7e..6764d0a8be3 100644 --- a/Userland/Libraries/LibWeb/Painting/SVGPathPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/SVGPathPaintable.cpp @@ -11,6 +11,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(SVGPathPaintable); + JS::NonnullGCPtr SVGPathPaintable::create(Layout::SVGGraphicsBox const& layout_box) { return layout_box.heap().allocate_without_realm(layout_box); diff --git a/Userland/Libraries/LibWeb/Painting/SVGPathPaintable.h b/Userland/Libraries/LibWeb/Painting/SVGPathPaintable.h index 5b56a11e5a5..d454924b576 100644 --- a/Userland/Libraries/LibWeb/Painting/SVGPathPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/SVGPathPaintable.h @@ -13,6 +13,7 @@ namespace Web::Painting { class SVGPathPaintable final : public SVGGraphicsPaintable { JS_CELL(SVGPathPaintable, SVGGraphicsPaintable); + JS_DECLARE_ALLOCATOR(SVGPathPaintable); public: static JS::NonnullGCPtr create(Layout::SVGGraphicsBox const&); diff --git a/Userland/Libraries/LibWeb/Painting/SVGSVGPaintable.cpp b/Userland/Libraries/LibWeb/Painting/SVGSVGPaintable.cpp index 08dbd6d990b..78146d373e0 100644 --- a/Userland/Libraries/LibWeb/Painting/SVGSVGPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/SVGSVGPaintable.cpp @@ -9,6 +9,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(SVGSVGPaintable); + JS::NonnullGCPtr SVGSVGPaintable::create(Layout::SVGSVGBox const& layout_box) { return layout_box.heap().allocate_without_realm(layout_box); diff --git a/Userland/Libraries/LibWeb/Painting/SVGSVGPaintable.h b/Userland/Libraries/LibWeb/Painting/SVGSVGPaintable.h index b09ce25ffd9..11330d669cf 100644 --- a/Userland/Libraries/LibWeb/Painting/SVGSVGPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/SVGSVGPaintable.h @@ -13,6 +13,7 @@ namespace Web::Painting { class SVGSVGPaintable final : public PaintableBox { JS_CELL(SVGSVGPaintable, PaintableBox); + JS_DECLARE_ALLOCATOR(SVGSVGPaintable); public: static JS::NonnullGCPtr create(Layout::SVGSVGBox const&); diff --git a/Userland/Libraries/LibWeb/Painting/TextPaintable.cpp b/Userland/Libraries/LibWeb/Painting/TextPaintable.cpp index 40751247f40..c5cfcbe59c5 100644 --- a/Userland/Libraries/LibWeb/Painting/TextPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/TextPaintable.cpp @@ -12,6 +12,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(TextPaintable); + JS::NonnullGCPtr TextPaintable::create(Layout::TextNode const& layout_node, String const& text_for_rendering) { return layout_node.heap().allocate_without_realm(layout_node, text_for_rendering); diff --git a/Userland/Libraries/LibWeb/Painting/TextPaintable.h b/Userland/Libraries/LibWeb/Painting/TextPaintable.h index f32270995ab..5154ddafd73 100644 --- a/Userland/Libraries/LibWeb/Painting/TextPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/TextPaintable.h @@ -12,6 +12,7 @@ namespace Web::Painting { class TextPaintable final : public Paintable { JS_CELL(TextPaintable, Paintable); + JS_DECLARE_ALLOCATOR(TextPaintable); public: static JS::NonnullGCPtr create(Layout::TextNode const&, String const& text_for_rendering); diff --git a/Userland/Libraries/LibWeb/Painting/VideoPaintable.cpp b/Userland/Libraries/LibWeb/Painting/VideoPaintable.cpp index 20a432f8f92..30680076d0a 100644 --- a/Userland/Libraries/LibWeb/Painting/VideoPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/VideoPaintable.cpp @@ -20,6 +20,8 @@ namespace Web::Painting { static constexpr auto control_box_color = Gfx::Color::from_rgb(0x26'26'26); static constexpr auto control_highlight_color = Gfx::Color::from_rgb(0x1d'99'f3); +JS_DEFINE_ALLOCATOR(VideoPaintable); + static constexpr Gfx::Color control_button_color(bool is_hovered) { if (!is_hovered) diff --git a/Userland/Libraries/LibWeb/Painting/VideoPaintable.h b/Userland/Libraries/LibWeb/Painting/VideoPaintable.h index 511e4122c38..4406db734d9 100644 --- a/Userland/Libraries/LibWeb/Painting/VideoPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/VideoPaintable.h @@ -13,6 +13,7 @@ namespace Web::Painting { class VideoPaintable final : public MediaPaintable { JS_CELL(VideoPaintable, MediaPaintable); + JS_DECLARE_ALLOCATOR(VideoPaintable); public: static JS::NonnullGCPtr create(Layout::VideoBox const&); diff --git a/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp b/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp index 20883e57754..2e27a24d01e 100644 --- a/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp @@ -14,6 +14,8 @@ namespace Web::Painting { +JS_DEFINE_ALLOCATOR(ViewportPaintable); + JS::NonnullGCPtr ViewportPaintable::create(Layout::Viewport const& layout_viewport) { return layout_viewport.heap().allocate_without_realm(layout_viewport); diff --git a/Userland/Libraries/LibWeb/Painting/ViewportPaintable.h b/Userland/Libraries/LibWeb/Painting/ViewportPaintable.h index 02a87b8a32b..6708c6e5c2e 100644 --- a/Userland/Libraries/LibWeb/Painting/ViewportPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/ViewportPaintable.h @@ -12,6 +12,7 @@ namespace Web::Painting { class ViewportPaintable final : public PaintableWithLines { JS_CELL(ViewportPaintable, PaintableWithLines); + JS_DECLARE_ALLOCATOR(ViewportPaintable); public: static JS::NonnullGCPtr create(Layout::Viewport const&); diff --git a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp index ae6bd03be46..8c84c4730c5 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp @@ -24,6 +24,7 @@ namespace Web::SVG { JS_DEFINE_ALLOCATOR(SVGDecodedImageData); +JS_DEFINE_ALLOCATOR(SVGDecodedImageData::SVGPageClient); ErrorOr> SVGDecodedImageData::create(JS::Realm& realm, JS::NonnullGCPtr host_page, URL::URL const& url, ByteBuffer data) { diff --git a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.h b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.h index 399641d6ecf..e7e9eb63b85 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.h +++ b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.h @@ -52,6 +52,7 @@ private: class SVGDecodedImageData::SVGPageClient final : public PageClient { JS_CELL(SVGDecodedImageData::SVGPageClient, PageClient); + JS_DECLARE_ALLOCATOR(SVGDecodedImageData::SVGPageClient); public: static JS::NonnullGCPtr create(JS::VM& vm, Page& page) diff --git a/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBReader.cpp b/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBReader.cpp index b32ee26193f..c71e66d3885 100644 --- a/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBReader.cpp +++ b/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBReader.cpp @@ -62,6 +62,7 @@ void ReadableStreamBYOBReader::visit_edges(Cell::Visitor& visitor) class BYOBReaderReadIntoRequest : public ReadIntoRequest { JS_CELL(BYOBReaderReadIntoRequest, ReadIntoRequest); + JS_DECLARE_ALLOCATOR(BYOBReaderReadIntoRequest); public: BYOBReaderReadIntoRequest(JS::Realm& realm, WebIDL::Promise& promise) @@ -103,6 +104,8 @@ private: JS::NonnullGCPtr m_promise; }; +JS_DEFINE_ALLOCATOR(BYOBReaderReadIntoRequest); + // https://streams.spec.whatwg.org/#byob-reader-read WebIDL::ExceptionOr> ReadableStreamBYOBReader::read(JS::Handle& view) { diff --git a/Userland/Libraries/LibWeb/Streams/ReadableStreamDefaultReader.cpp b/Userland/Libraries/LibWeb/Streams/ReadableStreamDefaultReader.cpp index 7c2e3107af4..603253b907a 100644 --- a/Userland/Libraries/LibWeb/Streams/ReadableStreamDefaultReader.cpp +++ b/Userland/Libraries/LibWeb/Streams/ReadableStreamDefaultReader.cpp @@ -24,6 +24,7 @@ namespace Web::Streams { JS_DEFINE_ALLOCATOR(ReadableStreamDefaultReader); +JS_DEFINE_ALLOCATOR(ReadLoopReadRequest); void ReadLoopReadRequest::visit_edges(Visitor& visitor) { @@ -116,6 +117,7 @@ void ReadLoopReadRequest::on_error(JS::Value error) class DefaultReaderReadRequest final : public ReadRequest { JS_CELL(DefaultReaderReadRequest, Cell); + JS_DECLARE_ALLOCATOR(DefaultReaderReadRequest); public: DefaultReaderReadRequest(JS::Realm& realm, WebIDL::Promise& promise) @@ -151,6 +153,8 @@ private: JS::NonnullGCPtr m_promise; }; +JS_DEFINE_ALLOCATOR(DefaultReaderReadRequest); + // https://streams.spec.whatwg.org/#default-reader-read WebIDL::ExceptionOr> ReadableStreamDefaultReader::read() { diff --git a/Userland/Libraries/LibWeb/Streams/ReadableStreamDefaultReader.h b/Userland/Libraries/LibWeb/Streams/ReadableStreamDefaultReader.h index 78c3d8e0a40..76ec0460c75 100644 --- a/Userland/Libraries/LibWeb/Streams/ReadableStreamDefaultReader.h +++ b/Userland/Libraries/LibWeb/Streams/ReadableStreamDefaultReader.h @@ -33,6 +33,7 @@ public: class ReadLoopReadRequest final : public ReadRequest { JS_CELL(ReadLoopReadRequest, JS::Cell); + JS_DECLARE_ALLOCATOR(ReadLoopReadRequest); public: // successSteps, which is an algorithm accepting a byte sequence diff --git a/Userland/Libraries/LibWeb/WebIDL/Buffers.cpp b/Userland/Libraries/LibWeb/WebIDL/Buffers.cpp index de7fa1a150c..fc164847fb5 100644 --- a/Userland/Libraries/LibWeb/WebIDL/Buffers.cpp +++ b/Userland/Libraries/LibWeb/WebIDL/Buffers.cpp @@ -11,6 +11,10 @@ namespace Web::WebIDL { +JS_DEFINE_ALLOCATOR(BufferableObjectBase); +JS_DEFINE_ALLOCATOR(ArrayBufferView); +JS_DEFINE_ALLOCATOR(BufferSource); + u32 BufferableObjectBase::byte_length() const { return m_bufferable_object.visit( diff --git a/Userland/Libraries/LibWeb/WebIDL/Buffers.h b/Userland/Libraries/LibWeb/WebIDL/Buffers.h index 848239587d6..bfc07c0a0e8 100644 --- a/Userland/Libraries/LibWeb/WebIDL/Buffers.h +++ b/Userland/Libraries/LibWeb/WebIDL/Buffers.h @@ -20,6 +20,7 @@ using BufferableObject = Variant< class BufferableObjectBase : public JS::Cell { JS_CELL(BufferableObjectBase, JS::Cell); + JS_DECLARE_ALLOCATOR(BufferableObjectBase); public: virtual ~BufferableObjectBase() override = default; @@ -54,6 +55,7 @@ protected: // Float32Array or Float64Array or DataView) ArrayBufferView; class ArrayBufferView : public BufferableObjectBase { JS_CELL(ArrayBufferView, BufferableObjectBase); + JS_DECLARE_ALLOCATOR(ArrayBufferView); public: using BufferableObjectBase::BufferableObjectBase; @@ -71,6 +73,7 @@ public: // typedef (ArrayBufferView or ArrayBuffer) BufferSource; class BufferSource : public BufferableObjectBase { JS_CELL(BufferSource, BufferableObjectBase); + JS_DECLARE_ALLOCATOR(BufferSource); public: using BufferableObjectBase::BufferableObjectBase; diff --git a/Userland/Libraries/LibWeb/WebIDL/ObservableArray.cpp b/Userland/Libraries/LibWeb/WebIDL/ObservableArray.cpp index a54fc4a4609..567f1402b92 100644 --- a/Userland/Libraries/LibWeb/WebIDL/ObservableArray.cpp +++ b/Userland/Libraries/LibWeb/WebIDL/ObservableArray.cpp @@ -9,6 +9,8 @@ namespace Web::WebIDL { +JS_DEFINE_ALLOCATOR(ObservableArray); + JS::NonnullGCPtr ObservableArray::create(JS::Realm& realm) { auto prototype = realm.intrinsics().array_prototype(); diff --git a/Userland/Libraries/LibWeb/WebIDL/ObservableArray.h b/Userland/Libraries/LibWeb/WebIDL/ObservableArray.h index 0013007df7a..5131ddefb31 100644 --- a/Userland/Libraries/LibWeb/WebIDL/ObservableArray.h +++ b/Userland/Libraries/LibWeb/WebIDL/ObservableArray.h @@ -13,6 +13,9 @@ namespace Web::WebIDL { // https://webidl.spec.whatwg.org/#idl-observable-array class ObservableArray final : public JS::Array { + JS_OBJECT(ObservableArray, JS::Array); + JS_DECLARE_ALLOCATOR(ObservableArray); + public: static JS::NonnullGCPtr create(JS::Realm& realm); diff --git a/Userland/Libraries/LibWeb/WebIDL/Promise.cpp b/Userland/Libraries/LibWeb/WebIDL/Promise.cpp index 3b7bda2e4c4..e1873ef68bb 100644 --- a/Userland/Libraries/LibWeb/WebIDL/Promise.cpp +++ b/Userland/Libraries/LibWeb/WebIDL/Promise.cpp @@ -176,6 +176,7 @@ void mark_promise_as_handled(Promise const& promise) struct WaitForAllResults : JS::Cell { JS_CELL(WaitForAllResults, JS::Cell); + JS_DECLARE_ALLOCATOR(WaitForAllResults); WaitForAllResults(JS::NonnullGCPtr const&)>> s, size_t t) : success_steps(s) @@ -202,6 +203,8 @@ struct WaitForAllResults : JS::Cell { size_t fulfilled_count = 0; }; +JS_DEFINE_ALLOCATOR(WaitForAllResults); + // https://webidl.spec.whatwg.org/#wait-for-all void wait_for_all(JS::Realm& realm, Vector> const& promises, Function const&)> success_steps, Function failure_steps) {