mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
LibJS: Convert to_length() to ThrowCompletionOr
This commit is contained in:
parent
750da61c0f
commit
aad12b050b
8 changed files with 20 additions and 34 deletions
|
@ -212,9 +212,8 @@ ThrowCompletionOr<Vector<String>> canonicalize_locale_list(GlobalObject& global_
|
|||
}
|
||||
|
||||
// 5. Let len be ? ToLength(? Get(O, "length")).
|
||||
auto length = TRY(object->get(vm.names.length)).to_length(global_object);
|
||||
if (auto* exception = vm.exception())
|
||||
return throw_completion(exception->value());
|
||||
auto length_value = TRY(object->get(vm.names.length));
|
||||
auto length = TRY(length_value.to_length(global_object));
|
||||
|
||||
// 6. Let k be 0.
|
||||
// 7. Repeat, while k < len,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue