mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +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
|
@ -52,7 +52,7 @@ ThrowCompletionOr<Object*> DisplayNamesConstructor::construct(FunctionObject& ne
|
|||
auto options_value = vm.argument(1);
|
||||
|
||||
// 2. Let displayNames be ? OrdinaryCreateFromConstructor(NewTarget, "%DisplayNames.prototype%", « [[InitializedDisplayNames]], [[Locale]], [[Style]], [[Type]], [[Fallback]], [[LanguageDisplay]], [[Fields]] »).
|
||||
auto* display_names = TRY(ordinary_create_from_constructor<DisplayNames>(vm, new_target, &Intrinsics::intl_display_names_prototype));
|
||||
auto display_names = TRY(ordinary_create_from_constructor<DisplayNames>(vm, new_target, &Intrinsics::intl_display_names_prototype));
|
||||
|
||||
// 3. Let requestedLocales be ? CanonicalizeLocaleList(locales).
|
||||
auto requested_locales = TRY(canonicalize_locale_list(vm, locale_value));
|
||||
|
@ -130,7 +130,7 @@ ThrowCompletionOr<Object*> DisplayNamesConstructor::construct(FunctionObject& ne
|
|||
// 29. Set displayNames.[[Fields]] to styleFields.
|
||||
|
||||
// 30. Return displayNames.
|
||||
return display_names;
|
||||
return display_names.ptr();
|
||||
}
|
||||
|
||||
// 12.2.2 Intl.DisplayNames.supportedLocalesOf ( locales [ , options ] ), https://tc39.es/ecma402/#sec-Intl.DisplayNames.supportedLocalesOf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue