mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibJS: Return a GC::Ref from Temporal::get_options_object
The Object returned here is always non-null.
This commit is contained in:
Notes:
github-actions[bot]
2024-11-21 00:06:36 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/e4e05837e18 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2431 Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/shannonbooth ✅
@@ -59,7 +59,7 @@ ThrowCompletionOr<GC::Ref<Object>> DurationFormatConstructor::construct(Function
|
||||
auto requested_locales = TRY(canonicalize_locale_list(vm, locales));
|
||||
|
||||
// 4. Let options be ? GetOptionsObject(options).
|
||||
auto* options = TRY(Temporal::get_options_object(vm, options_value));
|
||||
auto options = TRY(Temporal::get_options_object(vm, options_value));
|
||||
|
||||
// 5. Let matcher be ? GetOption(options, "localeMatcher", string, « "lookup", "best fit" », "best fit").
|
||||
auto matcher = TRY(get_option(vm, *options, vm.names.localeMatcher, OptionType::String, { "lookup"sv, "best fit"sv }, "best fit"sv));
|
||||
|
||||
Reference in New Issue
Block a user