mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 09:49:21 +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
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue