mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
LibJS: Convert GetIterator AO to ThrowCompletionOr
This commit is contained in:
parent
a3b3800cd4
commit
860a37640b
9 changed files with 56 additions and 48 deletions
|
@ -478,7 +478,10 @@ void PutByValue::execute_impl(Bytecode::Interpreter& interpreter) const
|
|||
|
||||
void GetIterator::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
{
|
||||
interpreter.accumulator() = get_iterator(interpreter.global_object(), interpreter.accumulator());
|
||||
auto iterator_or_error = get_iterator(interpreter.global_object(), interpreter.accumulator());
|
||||
if (iterator_or_error.is_error())
|
||||
return;
|
||||
interpreter.accumulator() = iterator_or_error.release_value();
|
||||
}
|
||||
|
||||
void IteratorNext::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue