mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Convert GetIterator AO to ThrowCompletionOr
This commit is contained in:
parent
a3b3800cd4
commit
860a37640b
Notes:
sideshowbarker
2024-07-18 02:07:19 +09:00
Author: https://github.com/trflynn89
Commit: 860a37640b
Pull-request: https://github.com/SerenityOS/serenity/pull/10546
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/linusg ✅
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