mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
LibJS: Don't assume non-empty [[Value]] in Completion TRY() helpers
This commit is contained in:
parent
032e6a2d28
commit
95acb1ce88
8 changed files with 10 additions and 9 deletions
|
@ -57,7 +57,7 @@ ThrowCompletionOr<Object*> SetConstructor::construct(FunctionObject& new_target)
|
|||
if (!adder.is_function())
|
||||
return vm.throw_completion<TypeError>(global_object, ErrorType::NotAFunction, "'add' property of Set");
|
||||
|
||||
TRY(get_iterator_values(global_object, vm.argument(0), [&](Value iterator_value) -> Optional<Completion> {
|
||||
(void)TRY(get_iterator_values(global_object, vm.argument(0), [&](Value iterator_value) -> Optional<Completion> {
|
||||
TRY(vm.call(adder.as_function(), Value(set), iterator_value));
|
||||
return {};
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue