mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibJS: Replace GlobalObject with VM in Temporal AOs [Part 2/19]
This commit is contained in:
parent
f9705eb2f4
commit
694f66b5ca
Notes:
sideshowbarker
2024-07-17 08:34:29 +09:00
Author: https://github.com/linusg
Commit: 694f66b5ca
Pull-request: https://github.com/SerenityOS/serenity/pull/14973
Reviewed-by: https://github.com/davidot ✅
58 changed files with 1564 additions and 1600 deletions
|
@ -569,13 +569,12 @@ Vector<String> best_fit_supported_locales(Vector<String> const& requested_locale
|
|||
ThrowCompletionOr<Array*> supported_locales(VM& vm, Vector<String> const& requested_locales, Value options)
|
||||
{
|
||||
auto& realm = *vm.current_realm();
|
||||
auto& global_object = realm.global_object();
|
||||
|
||||
// 1. Set options to ? CoerceOptionsToObject(options).
|
||||
auto* options_object = TRY(coerce_options_to_object(vm, options));
|
||||
|
||||
// 2. Let matcher be ? GetOption(options, "localeMatcher", "string", « "lookup", "best fit" », "best fit").
|
||||
auto matcher = TRY(get_option(global_object, *options_object, vm.names.localeMatcher, OptionType::String, { "lookup"sv, "best fit"sv }, "best fit"sv));
|
||||
auto matcher = TRY(get_option(vm, *options_object, vm.names.localeMatcher, OptionType::String, { "lookup"sv, "best fit"sv }, "best fit"sv));
|
||||
|
||||
Vector<String> supported_locales;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue