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

LibJS+LibWeb: Add missing JS_DEFINE_ALLOCATOR() for a bunch of classes

This commit is contained in:
Andreas Kling 2023-12-23 15:15:27 +01:00
parent 11c968fa1f
commit f4fa37afd2
15 changed files with 25 additions and 3 deletions

View file

@ -14,7 +14,7 @@
namespace JS {
JS_DECLARE_ALLOCATOR(AsyncFromSyncIteratorPrototype);
JS_DEFINE_ALLOCATOR(AsyncFromSyncIteratorPrototype);
AsyncFromSyncIteratorPrototype::AsyncFromSyncIteratorPrototype(Realm& realm)
: PrototypeObject(realm.intrinsics().async_iterator_prototype())

View file

@ -10,6 +10,8 @@
namespace JS::Intl {
JS_DEFINE_ALLOCATOR(NumberFormatFunction);
// 15.5.2 Number Format Functions, https://tc39.es/ecma402/#sec-number-format-functions
NonnullGCPtr<NumberFormatFunction> NumberFormatFunction::create(Realm& realm, NumberFormat& number_format)
{

View file

@ -14,6 +14,7 @@ namespace JS::Intl {
class NumberFormatFunction final : public NativeFunction {
JS_OBJECT(NumberFormatFunction, NativeFunction);
JS_DECLARE_ALLOCATOR(NumberFormatFunction);
public:
static NonnullGCPtr<NumberFormatFunction> create(Realm&, NumberFormat&);

View file

@ -11,6 +11,8 @@
namespace JS {
JS_DEFINE_ALLOCATOR(Symbol);
Symbol::Symbol(Optional<String> description, bool is_global)
: m_description(move(description))
, m_is_global(is_global)

View file

@ -14,6 +14,8 @@
namespace JS::Temporal {
JS_DEFINE_ALLOCATOR(DurationConstructor);
// 7.1 The Temporal.Duration Constructor, https://tc39.es/proposal-temporal/#sec-temporal-duration-constructor
DurationConstructor::DurationConstructor(Realm& realm)
: NativeFunction(realm.vm().names.Duration.as_string(), realm.intrinsics().function_prototype())