mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
LibJS: Convert IteratorValue AO to ThrowCompletionOr
This commit is contained in:
parent
a64752cd34
commit
7b4814f74c
Notes:
sideshowbarker
2024-07-18 02:06:59 +09:00
Author: https://github.com/trflynn89
Commit: 7b4814f74c
Pull-request: https://github.com/SerenityOS/serenity/pull/10546
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/linusg ✅
8 changed files with 20 additions and 21 deletions
|
@ -134,9 +134,7 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayConstructor::from)
|
|||
return array;
|
||||
}
|
||||
|
||||
auto next_value = iterator_value(global_object, *next);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto next_value = TRY_OR_DISCARD(iterator_value(global_object, *next));
|
||||
|
||||
Value mapped_value;
|
||||
if (map_fn) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue