LibJS: Convert ordinary_create_from_constructor() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-14 18:34:32 +00:00 committed by Tim Flynn
commit 1c24b82dd7
Notes: sideshowbarker 2024-07-17 03:09:26 +09:00
39 changed files with 80 additions and 80 deletions

View file

@ -51,7 +51,7 @@ ThrowCompletionOr<Object*> SegmenterConstructor::construct(FunctionObject& new_t
// 2. Let internalSlotsList be « [[InitializedSegmenter]], [[Locale]], [[SegmenterGranularity]] ».
// 3. Let segmenter be ? OrdinaryCreateFromConstructor(NewTarget, "%Segmenter.prototype%", internalSlotsList).
auto* segmenter = TRY(ordinary_create_from_constructor<Segmenter>(vm, new_target, &Intrinsics::intl_segmenter_prototype));
auto segmenter = TRY(ordinary_create_from_constructor<Segmenter>(vm, new_target, &Intrinsics::intl_segmenter_prototype));
// 4. Let requestedLocales be ? CanonicalizeLocaleList(locales).
auto requested_locales = TRY(canonicalize_locale_list(vm, locales));
@ -83,7 +83,7 @@ ThrowCompletionOr<Object*> SegmenterConstructor::construct(FunctionObject& new_t
segmenter->set_segmenter_granularity(granularity.as_string().deprecated_string());
// 14. Return segmenter.
return segmenter;
return segmenter.ptr();
}
// 18.2.2 Intl.Segmenter.supportedLocalesOf ( locales [ , options ] ), https://tc39.es/ecma402/#sec-intl.segmenter.supportedlocalesof