mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 17:19:13 +00:00
LibJS: Convert ordinary_create_from_constructor() to NonnullGCPtr
This commit is contained in:
parent
22089436ed
commit
1c24b82dd7
Notes:
sideshowbarker
2024-07-17 03:09:26 +09:00
Author: https://github.com/linusg
Commit: 1c24b82dd7
Pull-request: https://github.com/SerenityOS/serenity/pull/16498
Reviewed-by: https://github.com/trflynn89 ✅
39 changed files with 80 additions and 80 deletions
|
@ -54,10 +54,10 @@ ThrowCompletionOr<Object*> RelativeTimeFormatConstructor::construct(FunctionObje
|
|||
auto options = vm.argument(1);
|
||||
|
||||
// 2. Let relativeTimeFormat be ? OrdinaryCreateFromConstructor(NewTarget, "%RelativeTimeFormat.prototype%", « [[InitializedRelativeTimeFormat]], [[Locale]], [[DataLocale]], [[Style]], [[Numeric]], [[NumberFormat]], [[NumberingSystem]], [[PluralRules]] »).
|
||||
auto* relative_time_format = TRY(ordinary_create_from_constructor<RelativeTimeFormat>(vm, new_target, &Intrinsics::intl_relative_time_format_prototype));
|
||||
auto relative_time_format = TRY(ordinary_create_from_constructor<RelativeTimeFormat>(vm, new_target, &Intrinsics::intl_relative_time_format_prototype));
|
||||
|
||||
// 3. Return ? InitializeRelativeTimeFormat(relativeTimeFormat, locales, options).
|
||||
return TRY(initialize_relative_time_format(vm, *relative_time_format, locales, options));
|
||||
return TRY(initialize_relative_time_format(vm, relative_time_format, locales, options));
|
||||
}
|
||||
|
||||
// 17.2.2 Intl.RelativeTimeFormat.supportedLocalesOf ( locales [ , options ] ), https://tc39.es/ecma402/#sec-Intl.RelativeTimeFormat.supportedLocalesOf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue