diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-14 18:34:32 +0000 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-12-15 06:56:37 -0500 |
commit | 1c24b82dd769c40243707c8c8ee5febaae2b2a58 (patch) | |
tree | 9d745045fe6abd03d76a71e7887bd3e870cde582 /Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp | |
parent | 22089436edec780e03960ecaa74bfc4930126534 (diff) | |
download | serenity-1c24b82dd769c40243707c8c8ee5febaae2b2a58.zip |
LibJS: Convert ordinary_create_from_constructor() to NonnullGCPtr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp index 49baca561b..9b66178776 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp @@ -54,17 +54,17 @@ ThrowCompletionOr<Object*> DateTimeFormatConstructor::construct(FunctionObject& auto options = vm.argument(1); // 2. Let dateTimeFormat be ? OrdinaryCreateFromConstructor(newTarget, "%DateTimeFormat.prototype%", ยซ [[InitializedDateTimeFormat]], [[Locale]], [[Calendar]], [[NumberingSystem]], [[TimeZone]], [[Weekday]], [[Era]], [[Year]], [[Month]], [[Day]], [[DayPeriod]], [[Hour]], [[Minute]], [[Second]], [[FractionalSecondDigits]], [[TimeZoneName]], [[HourCycle]], [[Pattern]], [[BoundFormat]] ยป). - auto* date_time_format = TRY(ordinary_create_from_constructor<DateTimeFormat>(vm, new_target, &Intrinsics::intl_date_time_format_prototype)); + auto date_time_format = TRY(ordinary_create_from_constructor<DateTimeFormat>(vm, new_target, &Intrinsics::intl_date_time_format_prototype)); // 3. Perform ? InitializeDateTimeFormat(dateTimeFormat, locales, options). - TRY(initialize_date_time_format(vm, *date_time_format, locales, options)); + TRY(initialize_date_time_format(vm, date_time_format, locales, options)); // 4. If the implementation supports the normative optional constructor mode of 4.3 Note 1, then // a. Let this be the this value. // b. Return ? ChainDateTimeFormat(dateTimeFormat, NewTarget, this). // 5. Return dateTimeFormat. - return date_time_format; + return date_time_format.ptr(); } // 11.2.2 Intl.DateTimeFormat.supportedLocalesOf ( locales [ , options ] ), https://tc39.es/ecma402/#sec-intl.datetimeformat.supportedlocalesof |