From 312946059b850056f7c50c0618e49025b2edc2b4 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sun, 8 Aug 2021 21:31:44 +0100 Subject: [PATCH] LibJS+Spreadsheet: Use js_string(VM&, ...) overload more --- Userland/Applications/Spreadsheet/JSIntegration.cpp | 4 ++-- Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp | 2 +- Userland/Libraries/LibJS/Runtime/MathObject.cpp | 2 +- Userland/Libraries/LibJS/Runtime/Object.cpp | 6 +++--- Userland/Libraries/LibJS/Runtime/PromisePrototype.cpp | 2 +- Userland/Libraries/LibJS/Runtime/ReflectObject.cpp | 2 +- Userland/Libraries/LibJS/Runtime/SetPrototype.cpp | 2 +- .../Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp | 2 +- .../Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp | 2 +- .../Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp | 2 +- Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp | 2 +- .../Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp | 2 +- .../LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp | 2 +- .../Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp | 2 +- .../LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp | 2 +- Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp | 2 +- .../Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp | 2 +- .../LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp | 2 +- Userland/Libraries/LibJS/Runtime/Value.cpp | 2 +- Userland/Libraries/LibJS/Runtime/WeakMapPrototype.cpp | 2 +- Userland/Libraries/LibJS/Runtime/WeakRefPrototype.cpp | 2 +- 21 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Userland/Applications/Spreadsheet/JSIntegration.cpp b/Userland/Applications/Spreadsheet/JSIntegration.cpp index 1d44868d3a..0b8cb6fcb0 100644 --- a/Userland/Applications/Spreadsheet/JSIntegration.cpp +++ b/Userland/Applications/Spreadsheet/JSIntegration.cpp @@ -192,9 +192,9 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::get_real_cell_contents) return JS::js_undefined(); if (cell->kind() == Spreadsheet::Cell::Kind::Formula) - return JS::js_string(vm.heap(), String::formatted("={}", cell->data())); + return JS::js_string(vm, String::formatted("={}", cell->data())); - return JS::js_string(vm.heap(), cell->data()); + return JS::js_string(vm, cell->data()); } JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::set_real_cell_contents) diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp index 14b1c12d52..955c44911a 100644 --- a/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp @@ -28,7 +28,7 @@ void ArrayBufferPrototype::initialize(GlobalObject& global_object) define_native_accessor(vm.names.byteLength, byte_length_getter, {}, Attribute::Configurable); // 25.1.5.4 ArrayBuffer.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-arraybuffer.prototype-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), vm.names.ArrayBuffer.as_string()), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, vm.names.ArrayBuffer.as_string()), Attribute::Configurable); } ArrayBufferPrototype::~ArrayBufferPrototype() diff --git a/Userland/Libraries/LibJS/Runtime/MathObject.cpp b/Userland/Libraries/LibJS/Runtime/MathObject.cpp index 7f28068c32..0ee372ea81 100644 --- a/Userland/Libraries/LibJS/Runtime/MathObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/MathObject.cpp @@ -71,7 +71,7 @@ void MathObject::initialize(GlobalObject& global_object) define_direct_property(vm.names.SQRT2, Value(M_SQRT2), 0); // 21.3.1.9 Math [ @@toStringTag ], https://tc39.es/ecma262/#sec-math-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), vm.names.Math.as_string()), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, vm.names.Math.as_string()), Attribute::Configurable); } MathObject::~MathObject() diff --git a/Userland/Libraries/LibJS/Runtime/Object.cpp b/Userland/Libraries/LibJS/Runtime/Object.cpp index 2323b6e00d..ea4df7667e 100644 --- a/Userland/Libraries/LibJS/Runtime/Object.cpp +++ b/Userland/Libraries/LibJS/Runtime/Object.cpp @@ -1027,14 +1027,14 @@ void Object::define_native_accessor(PropertyName const& property_name, Function< auto name = String::formatted("get {}", formatted_property_name); getter_function = NativeFunction::create(global_object(), name, move(getter)); getter_function->define_direct_property(vm.names.length, Value(0), Attribute::Configurable); - getter_function->define_direct_property(vm.names.name, js_string(vm.heap(), name), Attribute::Configurable); + getter_function->define_direct_property(vm.names.name, js_string(vm, name), Attribute::Configurable); } FunctionObject* setter_function = nullptr; if (setter) { auto name = String::formatted("set {}", formatted_property_name); setter_function = NativeFunction::create(global_object(), name, move(setter)); setter_function->define_direct_property(vm.names.length, Value(1), Attribute::Configurable); - setter_function->define_direct_property(vm.names.name, js_string(vm.heap(), name), Attribute::Configurable); + setter_function->define_direct_property(vm.names.name, js_string(vm, name), Attribute::Configurable); } return define_direct_accessor(property_name, getter_function, setter_function, attribute); } @@ -1088,7 +1088,7 @@ void Object::define_native_function(PropertyName const& property_name, Function< } auto* function = NativeFunction::create(global_object(), function_name, move(native_function)); function->define_direct_property(vm.names.length, Value(length), Attribute::Configurable); - function->define_direct_property(vm.names.name, js_string(vm.heap(), function_name), Attribute::Configurable); + function->define_direct_property(vm.names.name, js_string(vm, function_name), Attribute::Configurable); define_direct_property(property_name, function, attribute); } diff --git a/Userland/Libraries/LibJS/Runtime/PromisePrototype.cpp b/Userland/Libraries/LibJS/Runtime/PromisePrototype.cpp index 75f436ccb7..4d1d825c8d 100644 --- a/Userland/Libraries/LibJS/Runtime/PromisePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/PromisePrototype.cpp @@ -32,7 +32,7 @@ void PromisePrototype::initialize(GlobalObject& global_object) define_native_function(vm.names.finally, finally, 1, attr); // 27.2.5.5 Promise.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-promise.prototype-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), vm.names.Promise.as_string()), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, vm.names.Promise.as_string()), Attribute::Configurable); } static Promise* promise_from(VM& vm, GlobalObject& global_object) diff --git a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp index e074e97760..b138bedb1c 100644 --- a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp @@ -40,7 +40,7 @@ void ReflectObject::initialize(GlobalObject& global_object) define_native_function(vm.names.setPrototypeOf, set_prototype_of, 2, attr); // 28.1.14 Reflect [ @@toStringTag ], https://tc39.es/ecma262/#sec-reflect-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), vm.names.Reflect.as_string()), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, vm.names.Reflect.as_string()), Attribute::Configurable); } ReflectObject::~ReflectObject() diff --git a/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp b/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp index e6d403cddc..6b0ef4031b 100644 --- a/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp @@ -37,7 +37,7 @@ void SetPrototype::initialize(GlobalObject& global_object) define_direct_property(*vm.well_known_symbol_iterator(), get(vm.names.values), attr); // 24.2.3.12 Set.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-set.prototype-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), vm.names.Set.as_string()), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, vm.names.Set.as_string()), Attribute::Configurable); } SetPrototype::~SetPrototype() diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp index c345ede2e6..bc76175f7b 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp @@ -27,7 +27,7 @@ void CalendarPrototype::initialize(GlobalObject& global_object) auto& vm = this->vm(); // 12.4.2 Temporal.Calendar.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.Calendar"), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.Calendar"), Attribute::Configurable); define_native_accessor(vm.names.id, id_getter, {}, Attribute::Configurable); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp index 1428854c47..faa811e92c 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp @@ -25,7 +25,7 @@ void DurationPrototype::initialize(GlobalObject& global_object) auto& vm = this->vm(); // 7.3.2 Temporal.Duration.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.Duration"), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.Duration"), Attribute::Configurable); define_native_accessor(vm.names.years, years_getter, {}, Attribute::Configurable); define_native_accessor(vm.names.months, months_getter, {}, Attribute::Configurable); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp index 5373fdeb44..4df6a3cfba 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp @@ -27,7 +27,7 @@ void InstantPrototype::initialize(GlobalObject& global_object) auto& vm = this->vm(); // 8.3.2 Temporal.Instant.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.Instant"), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.Instant"), Attribute::Configurable); define_native_accessor(vm.names.epochSeconds, epoch_seconds_getter, {}, Attribute::Configurable); define_native_accessor(vm.names.epochMilliseconds, epoch_milliseconds_getter, {}, Attribute::Configurable); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp index 3db03d2345..664710dab0 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp @@ -31,7 +31,7 @@ void Now::initialize(GlobalObject& global_object) auto& vm = this->vm(); // 2.1.1 Temporal.Now [ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal-now-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.Now"), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.Now"), Attribute::Configurable); u8 attr = Attribute::Writable | Attribute::Configurable; define_native_function(vm.names.timeZone, time_zone, 0, attr); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp index d01790bb9c..d1f1e72467 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp @@ -26,7 +26,7 @@ void PlainDatePrototype::initialize(GlobalObject& global_object) auto& vm = this->vm(); // 3.3.2 Temporal.PlainDate.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.PlainDate"), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.PlainDate"), Attribute::Configurable); define_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable); define_native_accessor(vm.names.year, year_getter, {}, Attribute::Configurable); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp index 5b80865692..43b4f97fa7 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp @@ -27,7 +27,7 @@ void PlainDateTimePrototype::initialize(GlobalObject& global_object) auto& vm = this->vm(); // 5.3.2 Temporal.PlainDateTime.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.PlainDateTime"), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.PlainDateTime"), Attribute::Configurable); define_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable); define_native_accessor(vm.names.year, year_getter, {}, Attribute::Configurable); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp index c4e0e3e339..4d83c1a477 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp @@ -27,7 +27,7 @@ void PlainTimePrototype::initialize(GlobalObject& global_object) auto& vm = this->vm(); // 4.3.2 Temporal.PlainTime.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.PlainTime"), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.PlainTime"), Attribute::Configurable); define_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable); define_native_accessor(vm.names.hour, hour_getter, {}, Attribute::Configurable); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp index aa239efd86..644871daa4 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp @@ -25,7 +25,7 @@ void PlainYearMonthPrototype::initialize(GlobalObject& global_object) auto& vm = this->vm(); // 9.3.2 Temporal.PlainYearMonth.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.PlainYearMonth"), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.PlainYearMonth"), Attribute::Configurable); define_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable); define_native_accessor(vm.names.year, year_getter, {}, Attribute::Configurable); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp index 4a010b7725..0d9c405d96 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp @@ -32,7 +32,7 @@ void Temporal::initialize(GlobalObject& global_object) auto& vm = this->vm(); // 1.1.1 Temporal [ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal"), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal"), Attribute::Configurable); u8 attr = Attribute::Writable | Attribute::Configurable; define_direct_property(vm.names.Now, heap().allocate(global_object, global_object), attr); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp index 355efd9dba..3842b8880c 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp @@ -35,7 +35,7 @@ void TimeZonePrototype::initialize(GlobalObject& global_object) define_native_function(vm.names.toJSON, to_json, 0, attr); // 11.4.2 Temporal.TimeZone.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.TimeZone"), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.TimeZone"), Attribute::Configurable); } static TimeZone* typed_this(GlobalObject& global_object) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp index ce93a08fdb..c610573388 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp @@ -30,7 +30,7 @@ void ZonedDateTimePrototype::initialize(GlobalObject& global_object) auto& vm = this->vm(); // 6.3.2 Temporal.ZonedDateTime.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.ZonedDateTime"), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.ZonedDateTime"), Attribute::Configurable); define_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable); define_native_accessor(vm.names.timeZone, time_zone_getter, {}, Attribute::Configurable); diff --git a/Userland/Libraries/LibJS/Runtime/Value.cpp b/Userland/Libraries/LibJS/Runtime/Value.cpp index 253d3e43bd..81cb54cf4c 100644 --- a/Userland/Libraries/LibJS/Runtime/Value.cpp +++ b/Userland/Libraries/LibJS/Runtime/Value.cpp @@ -1110,7 +1110,7 @@ Value add(GlobalObject& global_object, Value lhs, Value rhs) StringBuilder builder(lhs_string.length() + rhs_string.length()); builder.append(lhs_string); builder.append(rhs_string); - return js_string(vm.heap(), builder.to_string()); + return js_string(vm, builder.to_string()); } auto lhs_numeric = lhs_primitive.to_numeric(global_object); diff --git a/Userland/Libraries/LibJS/Runtime/WeakMapPrototype.cpp b/Userland/Libraries/LibJS/Runtime/WeakMapPrototype.cpp index 33af7a91f1..a64825511a 100644 --- a/Userland/Libraries/LibJS/Runtime/WeakMapPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/WeakMapPrototype.cpp @@ -27,7 +27,7 @@ void WeakMapPrototype::initialize(GlobalObject& global_object) define_native_function(vm.names.set, set, 2, attr); // 24.3.3.6 WeakMap.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-weakmap.prototype-@@tostringtag - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), vm.names.WeakMap.as_string()), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, vm.names.WeakMap.as_string()), Attribute::Configurable); } WeakMapPrototype::~WeakMapPrototype() diff --git a/Userland/Libraries/LibJS/Runtime/WeakRefPrototype.cpp b/Userland/Libraries/LibJS/Runtime/WeakRefPrototype.cpp index 939981853d..8f9a3858f8 100644 --- a/Userland/Libraries/LibJS/Runtime/WeakRefPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/WeakRefPrototype.cpp @@ -21,7 +21,7 @@ void WeakRefPrototype::initialize(GlobalObject& global_object) define_native_function(vm.names.deref, deref, 0, Attribute::Writable | Attribute::Configurable); - define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), vm.names.WeakRef.as_string()), Attribute::Configurable); + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, vm.names.WeakRef.as_string()), Attribute::Configurable); } WeakRefPrototype::~WeakRefPrototype()