diff options
Diffstat (limited to 'Userland/Libraries/LibJS')
74 files changed, 80 insertions, 79 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/AggregateErrorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/AggregateErrorPrototype.cpp index 370c9d6569..033099d8ec 100644 --- a/Userland/Libraries/LibJS/Runtime/AggregateErrorPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/AggregateErrorPrototype.cpp @@ -11,7 +11,7 @@ namespace JS { AggregateErrorPrototype::AggregateErrorPrototype(Realm& realm) - : Object(*realm.intrinsics().error_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().error_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/ArgumentsObject.cpp b/Userland/Libraries/LibJS/Runtime/ArgumentsObject.cpp index ffc05bf542..e5e8179958 100644 --- a/Userland/Libraries/LibJS/Runtime/ArgumentsObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/ArgumentsObject.cpp @@ -11,7 +11,7 @@ namespace JS { ArgumentsObject::ArgumentsObject(Realm& realm, Environment& environment) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) , m_environment(environment) { } diff --git a/Userland/Libraries/LibJS/Runtime/Array.cpp b/Userland/Libraries/LibJS/Runtime/Array.cpp index 1d89d4f8d7..3a8c6ae8fe 100644 --- a/Userland/Libraries/LibJS/Runtime/Array.cpp +++ b/Userland/Libraries/LibJS/Runtime/Array.cpp @@ -61,7 +61,7 @@ NonnullGCPtr<Array> Array::create_from(Realm& realm, Vector<Value> const& elemen } Array::Array(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBuffer.cpp b/Userland/Libraries/LibJS/Runtime/ArrayBuffer.cpp index 77394e8a2c..772fc285ce 100644 --- a/Userland/Libraries/LibJS/Runtime/ArrayBuffer.cpp +++ b/Userland/Libraries/LibJS/Runtime/ArrayBuffer.cpp @@ -31,14 +31,14 @@ NonnullGCPtr<ArrayBuffer> ArrayBuffer::create(Realm& realm, ByteBuffer* buffer) } ArrayBuffer::ArrayBuffer(ByteBuffer buffer, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_buffer(move(buffer)) , m_detach_key(js_undefined()) { } ArrayBuffer::ArrayBuffer(ByteBuffer* buffer, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_buffer(buffer) , m_detach_key(js_undefined()) { diff --git a/Userland/Libraries/LibJS/Runtime/ArrayIterator.cpp b/Userland/Libraries/LibJS/Runtime/ArrayIterator.cpp index 39d428d412..eca16e4108 100644 --- a/Userland/Libraries/LibJS/Runtime/ArrayIterator.cpp +++ b/Userland/Libraries/LibJS/Runtime/ArrayIterator.cpp @@ -15,7 +15,7 @@ NonnullGCPtr<ArrayIterator> ArrayIterator::create(Realm& realm, Value array, Obj } ArrayIterator::ArrayIterator(Value array, Object::PropertyKind iteration_kind, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_array(array) , m_iteration_kind(iteration_kind) { diff --git a/Userland/Libraries/LibJS/Runtime/AsyncFromSyncIterator.cpp b/Userland/Libraries/LibJS/Runtime/AsyncFromSyncIterator.cpp index 7e02af21a1..9459ccc1d2 100644 --- a/Userland/Libraries/LibJS/Runtime/AsyncFromSyncIterator.cpp +++ b/Userland/Libraries/LibJS/Runtime/AsyncFromSyncIterator.cpp @@ -17,7 +17,7 @@ NonnullGCPtr<AsyncFromSyncIterator> AsyncFromSyncIterator::create(Realm& realm, } AsyncFromSyncIterator::AsyncFromSyncIterator(Realm& realm, Iterator sync_iterator_record) - : Object(*realm.intrinsics().async_from_sync_iterator_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().async_from_sync_iterator_prototype()) , m_sync_iterator_record(sync_iterator_record) { } diff --git a/Userland/Libraries/LibJS/Runtime/AsyncFunctionPrototype.cpp b/Userland/Libraries/LibJS/Runtime/AsyncFunctionPrototype.cpp index 55f42d0dd1..fab88a66ec 100644 --- a/Userland/Libraries/LibJS/Runtime/AsyncFunctionPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/AsyncFunctionPrototype.cpp @@ -10,7 +10,7 @@ namespace JS { AsyncFunctionPrototype::AsyncFunctionPrototype(Realm& realm) - : Object(*realm.intrinsics().function_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().function_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/AsyncGenerator.cpp b/Userland/Libraries/LibJS/Runtime/AsyncGenerator.cpp index 6ead23830c..20c023afda 100644 --- a/Userland/Libraries/LibJS/Runtime/AsyncGenerator.cpp +++ b/Userland/Libraries/LibJS/Runtime/AsyncGenerator.cpp @@ -12,7 +12,7 @@ namespace JS { AsyncGenerator::AsyncGenerator(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/AsyncIteratorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/AsyncIteratorPrototype.cpp index 9ec5c2608d..bcfa3a948f 100644 --- a/Userland/Libraries/LibJS/Runtime/AsyncIteratorPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/AsyncIteratorPrototype.cpp @@ -9,7 +9,7 @@ namespace JS { AsyncIteratorPrototype::AsyncIteratorPrototype(Realm& realm) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/AtomicsObject.cpp b/Userland/Libraries/LibJS/Runtime/AtomicsObject.cpp index 19753f3313..5003171358 100644 --- a/Userland/Libraries/LibJS/Runtime/AtomicsObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/AtomicsObject.cpp @@ -125,7 +125,7 @@ static ThrowCompletionOr<Value> perform_atomic_operation(VM& vm, TypedArrayBase& } AtomicsObject::AtomicsObject(Realm& realm) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/BigIntObject.cpp b/Userland/Libraries/LibJS/Runtime/BigIntObject.cpp index fcba8c987f..686f790200 100644 --- a/Userland/Libraries/LibJS/Runtime/BigIntObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/BigIntObject.cpp @@ -15,7 +15,7 @@ NonnullGCPtr<BigIntObject> BigIntObject::create(Realm& realm, BigInt& bigint) } BigIntObject::BigIntObject(BigInt& bigint, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_bigint(bigint) { } diff --git a/Userland/Libraries/LibJS/Runtime/BigIntPrototype.cpp b/Userland/Libraries/LibJS/Runtime/BigIntPrototype.cpp index 23654ac87c..c1884f704b 100644 --- a/Userland/Libraries/LibJS/Runtime/BigIntPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/BigIntPrototype.cpp @@ -18,7 +18,7 @@ namespace JS { BigIntPrototype::BigIntPrototype(Realm& realm) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/BooleanObject.cpp b/Userland/Libraries/LibJS/Runtime/BooleanObject.cpp index ec8b9a16d9..21decbc74b 100644 --- a/Userland/Libraries/LibJS/Runtime/BooleanObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/BooleanObject.cpp @@ -15,7 +15,7 @@ NonnullGCPtr<BooleanObject> BooleanObject::create(Realm& realm, bool value) } BooleanObject::BooleanObject(bool value, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_value(value) { } diff --git a/Userland/Libraries/LibJS/Runtime/ConsoleObject.cpp b/Userland/Libraries/LibJS/Runtime/ConsoleObject.cpp index 1d17f2a7eb..a9e56d2adb 100644 --- a/Userland/Libraries/LibJS/Runtime/ConsoleObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/ConsoleObject.cpp @@ -13,7 +13,7 @@ namespace JS { ConsoleObject::ConsoleObject(Realm& realm) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) , m_console(make<Console>(realm)) { } diff --git a/Userland/Libraries/LibJS/Runtime/DataView.cpp b/Userland/Libraries/LibJS/Runtime/DataView.cpp index 050a863e91..bf4ac73680 100644 --- a/Userland/Libraries/LibJS/Runtime/DataView.cpp +++ b/Userland/Libraries/LibJS/Runtime/DataView.cpp @@ -14,7 +14,7 @@ NonnullGCPtr<DataView> DataView::create(Realm& realm, ArrayBuffer* viewed_buffer } DataView::DataView(ArrayBuffer* viewed_buffer, size_t byte_length, size_t byte_offset, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_viewed_array_buffer(viewed_buffer) , m_byte_length(byte_length) , m_byte_offset(byte_offset) diff --git a/Userland/Libraries/LibJS/Runtime/Date.cpp b/Userland/Libraries/LibJS/Runtime/Date.cpp index 3bd4596e4e..0c553da8ac 100644 --- a/Userland/Libraries/LibJS/Runtime/Date.cpp +++ b/Userland/Libraries/LibJS/Runtime/Date.cpp @@ -27,7 +27,7 @@ NonnullGCPtr<Date> Date::create(Realm& realm, double date_value) } Date::Date(double date_value, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_date_value(date_value) { } diff --git a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp index 04c6e90766..e9ca728072 100644 --- a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp @@ -208,7 +208,7 @@ ThrowCompletionOr<Object*> ECMAScriptFunctionObject::internal_construct(MarkedVe // 3. If kind is base, then if (kind == ConstructorKind::Base) { // a. Let thisArgument be ? OrdinaryCreateFromConstructor(newTarget, "%Object.prototype%"). - this_argument = TRY(ordinary_create_from_constructor<Object>(vm, new_target, &Intrinsics::object_prototype)); + this_argument = TRY(ordinary_create_from_constructor<Object>(vm, new_target, &Intrinsics::object_prototype, ConstructWithPrototypeTag::Tag)); } ExecutionContext callee_context(heap()); diff --git a/Userland/Libraries/LibJS/Runtime/Error.cpp b/Userland/Libraries/LibJS/Runtime/Error.cpp index c5052d6cca..ca3960899a 100644 --- a/Userland/Libraries/LibJS/Runtime/Error.cpp +++ b/Userland/Libraries/LibJS/Runtime/Error.cpp @@ -29,7 +29,7 @@ NonnullGCPtr<Error> Error::create(Realm& realm, DeprecatedString const& message) } Error::Error(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { populate_stack(); } diff --git a/Userland/Libraries/LibJS/Runtime/FinalizationRegistry.cpp b/Userland/Libraries/LibJS/Runtime/FinalizationRegistry.cpp index a11ba51d45..3ba8e98d1d 100644 --- a/Userland/Libraries/LibJS/Runtime/FinalizationRegistry.cpp +++ b/Userland/Libraries/LibJS/Runtime/FinalizationRegistry.cpp @@ -10,7 +10,7 @@ namespace JS { FinalizationRegistry::FinalizationRegistry(Realm& realm, JobCallback cleanup_callback, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , WeakContainer(heap()) , m_realm(realm) , m_cleanup_callback(move(cleanup_callback)) diff --git a/Userland/Libraries/LibJS/Runtime/FunctionObject.cpp b/Userland/Libraries/LibJS/Runtime/FunctionObject.cpp index 1552634b76..03a4f6527f 100644 --- a/Userland/Libraries/LibJS/Runtime/FunctionObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/FunctionObject.cpp @@ -19,7 +19,7 @@ FunctionObject::FunctionObject(Realm& realm, Object* prototype) } FunctionObject::FunctionObject(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/GeneratorFunctionPrototype.cpp b/Userland/Libraries/LibJS/Runtime/GeneratorFunctionPrototype.cpp index 3343ca3ad2..47a7668c4b 100644 --- a/Userland/Libraries/LibJS/Runtime/GeneratorFunctionPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/GeneratorFunctionPrototype.cpp @@ -11,7 +11,7 @@ namespace JS { GeneratorFunctionPrototype::GeneratorFunctionPrototype(Realm& realm) - : Object(*realm.intrinsics().function_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().function_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/GeneratorObject.cpp b/Userland/Libraries/LibJS/Runtime/GeneratorObject.cpp index 0daf443ce4..206ecc2597 100644 --- a/Userland/Libraries/LibJS/Runtime/GeneratorObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/GeneratorObject.cpp @@ -36,7 +36,7 @@ ThrowCompletionOr<NonnullGCPtr<GeneratorObject>> GeneratorObject::create(Realm& } GeneratorObject::GeneratorObject(Realm&, Object& prototype, ExecutionContext context) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_execution_context(move(context)) { } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Collator.cpp b/Userland/Libraries/LibJS/Runtime/Intl/Collator.cpp index b705d4adc5..fa2355888d 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/Collator.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/Collator.cpp @@ -10,7 +10,7 @@ namespace JS::Intl { // 10 Collator Objects, https://tc39.es/ecma402/#collator-objects Collator::Collator(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp index 2df15f9d70..7fe44e48ff 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp @@ -26,7 +26,7 @@ static Crypto::SignedBigInteger const s_one_million_bigint { 1'000'000 }; // 11 DateTimeFormat Objects, https://tc39.es/ecma402/#datetimeformat-objects DateTimeFormat::DateTimeFormat(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.cpp index 3d5358d1ae..f928d527ae 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.cpp @@ -12,7 +12,7 @@ namespace JS::Intl { // 12 DisplayNames Objects, https://tc39.es/ecma402/#intl-displaynames-objects DisplayNames::DisplayNames(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp index 8afbfd61cc..9b555a7046 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp @@ -20,7 +20,7 @@ namespace JS::Intl { // 1 DurationFormat Objects, https://tc39.es/proposal-intl-duration-format/#durationformat-objects DurationFormat::DurationFormat(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp b/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp index a9ba5d3526..b9787f157e 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp @@ -28,7 +28,7 @@ namespace JS::Intl { // 8 The Intl Object, https://tc39.es/ecma402/#intl-object Intl::Intl(Realm& realm) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/ListFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/ListFormat.cpp index c594789e1d..8958b44112 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/ListFormat.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/ListFormat.cpp @@ -14,7 +14,7 @@ namespace JS::Intl { // 13 ListFormat Objects, https://tc39.es/ecma402/#listformat-objects ListFormat::ListFormat(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Locale.cpp b/Userland/Libraries/LibJS/Runtime/Intl/Locale.cpp index 4256d0d683..3907cbf695 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/Locale.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/Locale.cpp @@ -21,12 +21,12 @@ NonnullGCPtr<Locale> Locale::create(Realm& realm, ::Locale::LocaleID const& loca // 14 Locale Objects, https://tc39.es/ecma402/#locale-objects Locale::Locale(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } Locale::Locale(::Locale::LocaleID const& locale_id, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { set_locale(locale_id.to_deprecated_string()); diff --git a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp index a5ea933c86..0a0ee0d7f6 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp @@ -21,7 +21,7 @@ namespace JS::Intl { NumberFormatBase::NumberFormatBase(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp index 5fd2251b4c..1dce1620b0 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp @@ -17,7 +17,7 @@ namespace JS::Intl { // 17 RelativeTimeFormat Objects, https://tc39.es/ecma402/#relativetimeformat-objects RelativeTimeFormat::RelativeTimeFormat(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/SegmentIterator.cpp b/Userland/Libraries/LibJS/Runtime/Intl/SegmentIterator.cpp index cf55a25f9e..0fbdf3c6d8 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/SegmentIterator.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/SegmentIterator.cpp @@ -24,7 +24,7 @@ NonnullGCPtr<SegmentIterator> SegmentIterator::create(Realm& realm, Segmenter& s // 18.6 Segment Iterator Objects, https://tc39.es/ecma402/#sec-segment-iterator-objects SegmentIterator::SegmentIterator(Realm& realm, Segmenter& segmenter, Utf16View const& string, Segments const& segments) - : Object(*realm.intrinsics().intl_segment_iterator_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().intl_segment_iterator_prototype()) , m_iterating_segmenter(segmenter) , m_iterated_string(string) , m_segments(segments) diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Segmenter.cpp b/Userland/Libraries/LibJS/Runtime/Intl/Segmenter.cpp index 1b3f63316c..d79be00a23 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/Segmenter.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/Segmenter.cpp @@ -14,7 +14,7 @@ namespace JS::Intl { // 18 Segmenter Objects, https://tc39.es/ecma402/#segmenter-objects Segmenter::Segmenter(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Segments.cpp b/Userland/Libraries/LibJS/Runtime/Intl/Segments.cpp index 57b0ffecc6..2572fcf6d7 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/Segments.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/Segments.cpp @@ -23,7 +23,7 @@ NonnullGCPtr<Segments> Segments::create(Realm& realm, Segmenter& segmenter, Utf1 // 18.5 Segments Objects, https://tc39.es/ecma402/#sec-segments-objects Segments::Segments(Realm& realm, Segmenter& segmenter, Utf16String string) - : Object(*realm.intrinsics().intl_segments_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().intl_segments_prototype()) , m_segments_segmenter(segmenter) , m_segments_string(move(string)) { diff --git a/Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp index 177c714961..914eda870c 100644 --- a/Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp @@ -12,7 +12,7 @@ namespace JS { // 27.1.2 The %IteratorPrototype% Object, https://tc39.es/ecma262/#sec-%iteratorprototype%-object IteratorPrototype::IteratorPrototype(Realm& realm) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/JSONObject.cpp b/Userland/Libraries/LibJS/Runtime/JSONObject.cpp index d70d0ebaf0..5698a819f1 100644 --- a/Userland/Libraries/LibJS/Runtime/JSONObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/JSONObject.cpp @@ -27,7 +27,7 @@ namespace JS { JSONObject::JSONObject(Realm& realm) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/Map.cpp b/Userland/Libraries/LibJS/Runtime/Map.cpp index 87fc6edbc7..e65dde2e04 100644 --- a/Userland/Libraries/LibJS/Runtime/Map.cpp +++ b/Userland/Libraries/LibJS/Runtime/Map.cpp @@ -14,7 +14,7 @@ NonnullGCPtr<Map> Map::create(Realm& realm) } Map::Map(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/MapIterator.cpp b/Userland/Libraries/LibJS/Runtime/MapIterator.cpp index 3ac21cfb64..7685bcee82 100644 --- a/Userland/Libraries/LibJS/Runtime/MapIterator.cpp +++ b/Userland/Libraries/LibJS/Runtime/MapIterator.cpp @@ -15,7 +15,7 @@ NonnullGCPtr<MapIterator> MapIterator::create(Realm& realm, Map& map, Object::Pr } MapIterator::MapIterator(Map& map, Object::PropertyKind iteration_kind, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_map(map) , m_iteration_kind(iteration_kind) , m_iterator(static_cast<Map const&>(map).begin()) diff --git a/Userland/Libraries/LibJS/Runtime/MathObject.cpp b/Userland/Libraries/LibJS/Runtime/MathObject.cpp index 33aa0670d2..8c537bcc92 100644 --- a/Userland/Libraries/LibJS/Runtime/MathObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/MathObject.cpp @@ -16,7 +16,7 @@ namespace JS { MathObject::MathObject(Realm& realm) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/ModuleNamespaceObject.cpp b/Userland/Libraries/LibJS/Runtime/ModuleNamespaceObject.cpp index c41a2ee49e..9924473049 100644 --- a/Userland/Libraries/LibJS/Runtime/ModuleNamespaceObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/ModuleNamespaceObject.cpp @@ -11,7 +11,7 @@ namespace JS { ModuleNamespaceObject::ModuleNamespaceObject(Realm& realm, Module* module, Vector<FlyString> exports) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) , m_module(module) , m_exports(move(exports)) { diff --git a/Userland/Libraries/LibJS/Runtime/NumberObject.cpp b/Userland/Libraries/LibJS/Runtime/NumberObject.cpp index 200e1d4265..0086a454ae 100644 --- a/Userland/Libraries/LibJS/Runtime/NumberObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/NumberObject.cpp @@ -15,7 +15,7 @@ NonnullGCPtr<NumberObject> NumberObject::create(Realm& realm, double value) } NumberObject::NumberObject(double value, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_value(value) { } diff --git a/Userland/Libraries/LibJS/Runtime/Object.cpp b/Userland/Libraries/LibJS/Runtime/Object.cpp index 4a614120d2..1de34675ba 100644 --- a/Userland/Libraries/LibJS/Runtime/Object.cpp +++ b/Userland/Libraries/LibJS/Runtime/Object.cpp @@ -34,7 +34,7 @@ NonnullGCPtr<Object> Object::create(Realm& realm, Object* prototype) else if (prototype == realm.intrinsics().object_prototype()) return *realm.heap().allocate<Object>(realm, *realm.intrinsics().new_object_shape()); else - return *realm.heap().allocate<Object>(realm, *prototype); + return *realm.heap().allocate<Object>(realm, ConstructWithPrototypeTag::Tag, *prototype); } Object::Object(GlobalObjectTag, Realm& realm) @@ -56,7 +56,7 @@ Object::Object(Realm& realm, Object* prototype) set_prototype(prototype); } -Object::Object(Object& prototype) +Object::Object(ConstructWithPrototypeTag, Object& prototype) { m_shape = prototype.shape().realm().intrinsics().empty_object_shape(); VERIFY(m_shape); diff --git a/Userland/Libraries/LibJS/Runtime/Object.h b/Userland/Libraries/LibJS/Runtime/Object.h index de134670b3..5cabe99c4b 100644 --- a/Userland/Libraries/LibJS/Runtime/Object.h +++ b/Userland/Libraries/LibJS/Runtime/Object.h @@ -191,11 +191,12 @@ public: protected: enum class GlobalObjectTag { Tag }; enum class ConstructWithoutPrototypeTag { Tag }; + enum class ConstructWithPrototypeTag { Tag }; Object(GlobalObjectTag, Realm&); Object(ConstructWithoutPrototypeTag, Realm&); Object(Realm&, Object* prototype); - explicit Object(Object& prototype); + Object(ConstructWithPrototypeTag, Object& prototype); explicit Object(Shape&); void set_prototype(Object*); diff --git a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp index 0dbc849867..779aa16639 100644 --- a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp @@ -70,7 +70,7 @@ ThrowCompletionOr<Object*> ObjectConstructor::construct(FunctionObject& new_targ auto& realm = *vm.current_realm(); if (&new_target != this) - return TRY(ordinary_create_from_constructor<Object>(vm, new_target, &Intrinsics::object_prototype)); + return TRY(ordinary_create_from_constructor<Object>(vm, new_target, &Intrinsics::object_prototype, ConstructWithPrototypeTag::Tag)); auto value = vm.argument(0); if (value.is_nullish()) return Object::create(realm, realm.intrinsics().object_prototype()).ptr(); diff --git a/Userland/Libraries/LibJS/Runtime/Promise.cpp b/Userland/Libraries/LibJS/Runtime/Promise.cpp index cc01bef99e..658fe85a33 100644 --- a/Userland/Libraries/LibJS/Runtime/Promise.cpp +++ b/Userland/Libraries/LibJS/Runtime/Promise.cpp @@ -49,7 +49,7 @@ NonnullGCPtr<Promise> Promise::create(Realm& realm) // 27.2 Promise Objects, https://tc39.es/ecma262/#sec-promise-objects Promise::Promise(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/PrototypeObject.h b/Userland/Libraries/LibJS/Runtime/PrototypeObject.h index cada17fb4d..35c5a95cc0 100644 --- a/Userland/Libraries/LibJS/Runtime/PrototypeObject.h +++ b/Userland/Libraries/LibJS/Runtime/PrototypeObject.h @@ -57,7 +57,7 @@ public: protected: explicit PrototypeObject(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } }; diff --git a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp index 2c679de90d..6134c40fa5 100644 --- a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp @@ -16,7 +16,7 @@ namespace JS { ReflectObject::ReflectObject(Realm& realm) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/RegExpObject.cpp b/Userland/Libraries/LibJS/Runtime/RegExpObject.cpp index 3cf1a687d4..7c0f49e25a 100644 --- a/Userland/Libraries/LibJS/Runtime/RegExpObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/RegExpObject.cpp @@ -135,12 +135,12 @@ NonnullGCPtr<RegExpObject> RegExpObject::create(Realm& realm, Regex<ECMA262> reg } RegExpObject::RegExpObject(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } RegExpObject::RegExpObject(Regex<ECMA262> regex, DeprecatedString pattern, DeprecatedString flags, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_pattern(move(pattern)) , m_flags(move(flags)) , m_regex(move(regex)) diff --git a/Userland/Libraries/LibJS/Runtime/RegExpStringIterator.cpp b/Userland/Libraries/LibJS/Runtime/RegExpStringIterator.cpp index 9d78648952..284462e69f 100644 --- a/Userland/Libraries/LibJS/Runtime/RegExpStringIterator.cpp +++ b/Userland/Libraries/LibJS/Runtime/RegExpStringIterator.cpp @@ -16,7 +16,7 @@ NonnullGCPtr<RegExpStringIterator> RegExpStringIterator::create(Realm& realm, Ob } RegExpStringIterator::RegExpStringIterator(Object& prototype, Object& regexp_object, Utf16String string, bool global, bool unicode) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_regexp_object(regexp_object) , m_string(move(string)) , m_global(global) diff --git a/Userland/Libraries/LibJS/Runtime/Set.cpp b/Userland/Libraries/LibJS/Runtime/Set.cpp index 652c24a2e1..9a6dec409b 100644 --- a/Userland/Libraries/LibJS/Runtime/Set.cpp +++ b/Userland/Libraries/LibJS/Runtime/Set.cpp @@ -14,7 +14,7 @@ NonnullGCPtr<Set> Set::create(Realm& realm) } Set::Set(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/SetIterator.cpp b/Userland/Libraries/LibJS/Runtime/SetIterator.cpp index 5e4b946e98..c951e67d5b 100644 --- a/Userland/Libraries/LibJS/Runtime/SetIterator.cpp +++ b/Userland/Libraries/LibJS/Runtime/SetIterator.cpp @@ -15,7 +15,7 @@ NonnullGCPtr<SetIterator> SetIterator::create(Realm& realm, Set& set, Object::Pr } SetIterator::SetIterator(Set& set, Object::PropertyKind iteration_kind, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_set(set) , m_iteration_kind(iteration_kind) , m_iterator(static_cast<Set const&>(set).begin()) diff --git a/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp b/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp index fcf1943506..05c9e0035e 100644 --- a/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp +++ b/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp @@ -20,7 +20,7 @@ namespace JS { ShadowRealm::ShadowRealm(Realm& shadow_realm, ExecutionContext execution_context, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_shadow_realm(shadow_realm) , m_execution_context(move(execution_context)) { diff --git a/Userland/Libraries/LibJS/Runtime/StringIterator.cpp b/Userland/Libraries/LibJS/Runtime/StringIterator.cpp index 0dac262bb1..6d8255976d 100644 --- a/Userland/Libraries/LibJS/Runtime/StringIterator.cpp +++ b/Userland/Libraries/LibJS/Runtime/StringIterator.cpp @@ -16,7 +16,7 @@ NonnullGCPtr<StringIterator> StringIterator::create(Realm& realm, DeprecatedStri } StringIterator::StringIterator(DeprecatedString string, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_string(move(string)) , m_iterator(Utf8View(m_string).begin()) { diff --git a/Userland/Libraries/LibJS/Runtime/StringObject.cpp b/Userland/Libraries/LibJS/Runtime/StringObject.cpp index 9ac059d875..1c451d7446 100644 --- a/Userland/Libraries/LibJS/Runtime/StringObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/StringObject.cpp @@ -21,7 +21,7 @@ NonnullGCPtr<StringObject> StringObject::create(Realm& realm, PrimitiveString& p } StringObject::StringObject(PrimitiveString& string, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_string(string) { } diff --git a/Userland/Libraries/LibJS/Runtime/SymbolObject.cpp b/Userland/Libraries/LibJS/Runtime/SymbolObject.cpp index cfd637561a..8426020955 100644 --- a/Userland/Libraries/LibJS/Runtime/SymbolObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/SymbolObject.cpp @@ -16,7 +16,7 @@ NonnullGCPtr<SymbolObject> SymbolObject::create(Realm& realm, Symbol& primitive_ } SymbolObject::SymbolObject(Symbol& symbol, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_symbol(symbol) { } diff --git a/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp b/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp index a2550d85eb..0f9e555a92 100644 --- a/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp @@ -19,7 +19,7 @@ namespace JS { SymbolPrototype::SymbolPrototype(Realm& realm) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp index e44f435aa6..c4ed4b55da 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp @@ -28,7 +28,7 @@ namespace JS::Temporal { // 12 Temporal.Calendar Objects, https://tc39.es/proposal-temporal/#sec-temporal-calendar-objects Calendar::Calendar(DeprecatedString identifier, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_identifier(move(identifier)) { } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp index 5573fe3c60..fb211a2d6c 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp @@ -24,7 +24,7 @@ namespace JS::Temporal { // 7 Temporal.Duration Objects, https://tc39.es/proposal-temporal/#sec-temporal-duration-objects Duration::Duration(double years, double months, double weeks, double days, double hours, double minutes, double seconds, double milliseconds, double microseconds, double nanoseconds, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_years(years) , m_months(months) , m_weeks(weeks) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp index 534a8c84d1..dff5500db8 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp @@ -24,7 +24,7 @@ namespace JS::Temporal { // 8 Temporal.Instant Objects, https://tc39.es/proposal-temporal/#sec-temporal-instant-objects Instant::Instant(BigInt const& nanoseconds, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_nanoseconds(nanoseconds) { } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp index 2602079f20..3e0b5af636 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp @@ -22,7 +22,7 @@ namespace JS::Temporal { // 2 The Temporal.Now Object, https://tc39.es/proposal-temporal/#sec-temporal-now-object Now::Now(Realm& realm) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp index d13b934fd1..7d20d7d91d 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp @@ -24,7 +24,7 @@ namespace JS::Temporal { // 3 Temporal.PlainDate Objects, https://tc39.es/proposal-temporal/#sec-temporal-plaindate-objects PlainDate::PlainDate(i32 year, u8 month, u8 day, Object& calendar, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_iso_year(year) , m_iso_month(month) , m_iso_day(day) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp index fc5771ddf8..dc1249b49c 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp @@ -25,7 +25,7 @@ namespace JS::Temporal { // 5 Temporal.PlainDateTime Objects, https://tc39.es/proposal-temporal/#sec-temporal-plaindatetime-objects PlainDateTime::PlainDateTime(i32 iso_year, u8 iso_month, u8 iso_day, u8 iso_hour, u8 iso_minute, u8 iso_second, u16 iso_millisecond, u16 iso_microsecond, u16 iso_nanosecond, Object& calendar, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_iso_year(iso_year) , m_iso_month(iso_month) , m_iso_day(iso_day) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDay.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDay.cpp index 68f7e2adfb..fce9dc46e5 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDay.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDay.cpp @@ -20,7 +20,7 @@ namespace JS::Temporal { // 10 Temporal.PlainMonthDay Objects, https://tc39.es/proposal-temporal/#sec-temporal-plainmonthday-objects PlainMonthDay::PlainMonthDay(u8 iso_month, u8 iso_day, i32 iso_year, Object& calendar, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_iso_year(iso_year) , m_iso_month(iso_month) , m_iso_day(iso_day) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTime.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTime.cpp index fa3ca3ab30..9bd34f226d 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTime.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTime.cpp @@ -24,7 +24,7 @@ namespace JS::Temporal { // 4 Temporal.PlainTime Objects, https://tc39.es/proposal-temporal/#sec-temporal-plaintime-objects PlainTime::PlainTime(u8 iso_hour, u8 iso_minute, u8 iso_second, u16 iso_millisecond, u16 iso_microsecond, u16 iso_nanosecond, Calendar& calendar, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_iso_hour(iso_hour) , m_iso_minute(iso_minute) , m_iso_second(iso_second) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp index 5c10f92938..c0f89530c9 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp @@ -19,7 +19,7 @@ namespace JS::Temporal { // 9 Temporal.PlainYearMonth Objects, https://tc39.es/proposal-temporal/#sec-temporal-plainyearmonth-objects PlainYearMonth::PlainYearMonth(i32 iso_year, u8 iso_month, u8 iso_day, Object& calendar, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_iso_year(iso_year) , m_iso_month(iso_month) , m_iso_day(iso_day) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp index 5d22c434f2..75c468d8b2 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp @@ -22,7 +22,7 @@ namespace JS::Temporal { // 1 The Temporal Object, https://tc39.es/proposal-temporal/#sec-temporal-objects Temporal::Temporal(Realm& realm) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp index cfc480264b..7d2878a93f 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp @@ -25,7 +25,7 @@ namespace JS::Temporal { // 11 Temporal.TimeZone Objects, https://tc39.es/proposal-temporal/#sec-temporal-timezone-objects TimeZone::TimeZone(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp index 9f752e5f84..c67470cf57 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp @@ -22,7 +22,7 @@ namespace JS::Temporal { // 6 Temporal.ZonedDateTime Objects, https://tc39.es/proposal-temporal/#sec-temporal-zoneddatetime-objects ZonedDateTime::ZonedDateTime(BigInt const& nanoseconds, Object& time_zone, Object& calendar, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_nanoseconds(nanoseconds) , m_time_zone(time_zone) , m_calendar(calendar) diff --git a/Userland/Libraries/LibJS/Runtime/TypedArray.cpp b/Userland/Libraries/LibJS/Runtime/TypedArray.cpp index 84ed2757a6..42746970de 100644 --- a/Userland/Libraries/LibJS/Runtime/TypedArray.cpp +++ b/Userland/Libraries/LibJS/Runtime/TypedArray.cpp @@ -459,7 +459,7 @@ void TypedArrayBase::visit_edges(Visitor& visitor) } \ \ PrototypeName::PrototypeName(Object& prototype) \ - : Object(prototype) \ + : Object(ConstructWithPrototypeTag::Tag, prototype) \ { \ } \ \ diff --git a/Userland/Libraries/LibJS/Runtime/TypedArray.h b/Userland/Libraries/LibJS/Runtime/TypedArray.h index 9993b6f5e8..e879f2e3b4 100644 --- a/Userland/Libraries/LibJS/Runtime/TypedArray.h +++ b/Userland/Libraries/LibJS/Runtime/TypedArray.h @@ -62,7 +62,7 @@ public: protected: TypedArrayBase(Object& prototype, IntrinsicConstructor intrinsic_constructor) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , m_intrinsic_constructor(intrinsic_constructor) { } diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp index d6bff2e42e..47f86f8d87 100644 --- a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp @@ -17,7 +17,7 @@ namespace JS { TypedArrayPrototype::TypedArrayPrototype(Realm& realm) - : Object(*realm.intrinsics().object_prototype()) + : Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) { } diff --git a/Userland/Libraries/LibJS/Runtime/WeakMap.cpp b/Userland/Libraries/LibJS/Runtime/WeakMap.cpp index f4e52c0cc8..eb5e0bd906 100644 --- a/Userland/Libraries/LibJS/Runtime/WeakMap.cpp +++ b/Userland/Libraries/LibJS/Runtime/WeakMap.cpp @@ -14,7 +14,7 @@ NonnullGCPtr<WeakMap> WeakMap::create(Realm& realm) } WeakMap::WeakMap(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , WeakContainer(heap()) { } diff --git a/Userland/Libraries/LibJS/Runtime/WeakRef.cpp b/Userland/Libraries/LibJS/Runtime/WeakRef.cpp index 7ec917f3d9..546f58bbf2 100644 --- a/Userland/Libraries/LibJS/Runtime/WeakRef.cpp +++ b/Userland/Libraries/LibJS/Runtime/WeakRef.cpp @@ -19,7 +19,7 @@ NonnullGCPtr<WeakRef> WeakRef::create(Realm& realm, Symbol& value) } WeakRef::WeakRef(Object& value, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , WeakContainer(heap()) , m_value(&value) , m_last_execution_generation(vm().execution_generation()) @@ -27,7 +27,7 @@ WeakRef::WeakRef(Object& value, Object& prototype) } WeakRef::WeakRef(Symbol& value, Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , WeakContainer(heap()) , m_value(&value) , m_last_execution_generation(vm().execution_generation()) diff --git a/Userland/Libraries/LibJS/Runtime/WeakSet.cpp b/Userland/Libraries/LibJS/Runtime/WeakSet.cpp index 157e81c2d9..89b1e9e0f2 100644 --- a/Userland/Libraries/LibJS/Runtime/WeakSet.cpp +++ b/Userland/Libraries/LibJS/Runtime/WeakSet.cpp @@ -14,7 +14,7 @@ NonnullGCPtr<WeakSet> WeakSet::create(Realm& realm) } WeakSet::WeakSet(Object& prototype) - : Object(prototype) + : Object(ConstructWithPrototypeTag::Tag, prototype) , WeakContainer(heap()) { } |