mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
LibJS: Convert ordinary_create_from_constructor() to NonnullGCPtr
This commit is contained in:
parent
22089436ed
commit
1c24b82dd7
39 changed files with 80 additions and 80 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue