mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
LibJS: Convert Value::invoke and VM::call to ThrowCompletionOr
This commit is contained in:
parent
a90107b02a
commit
ab594e5f2f
35 changed files with 196 additions and 328 deletions
|
@ -72,8 +72,8 @@ Value WeakMapConstructor::construct(FunctionObject& new_target)
|
|||
auto value = iterator_value.as_object().get(1);
|
||||
if (vm.exception())
|
||||
return IterationDecision::Break;
|
||||
(void)vm.call(adder.as_function(), Value(weak_map), key, value);
|
||||
return vm.exception() ? IterationDecision::Break : IterationDecision::Continue;
|
||||
auto result = vm.call(adder.as_function(), Value(weak_map), key, value);
|
||||
return result.is_error() ? IterationDecision::Break : IterationDecision::Continue;
|
||||
});
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue