mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibJS: Convert IteratorComplete AO to ThrowCompletionOr
This commit is contained in:
committed by
Linus Groh
parent
8be1caa05d
commit
a64752cd34
Notes:
sideshowbarker
2024-07-18 02:07:03 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/a64752cd34b Pull-request: https://github.com/SerenityOS/serenity/pull/10546 Reviewed-by: https://github.com/IdanHo Reviewed-by: https://github.com/linusg ✅
@@ -149,9 +149,10 @@ void IteratorToArray::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
return;
|
||||
auto* iterator_result = iterator_result_or_error.release_value();
|
||||
|
||||
auto complete = iterator_complete(global_object, *iterator_result);
|
||||
if (vm.exception())
|
||||
auto complete_or_error = iterator_complete(global_object, *iterator_result);
|
||||
if (complete_or_error.is_error())
|
||||
return;
|
||||
auto complete = complete_or_error.release_value();
|
||||
|
||||
if (complete) {
|
||||
interpreter.accumulator() = array;
|
||||
@@ -506,7 +507,13 @@ void IteratorResultDone::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
if (iterator_result_or_error.is_error())
|
||||
return;
|
||||
auto* iterator_result = iterator_result_or_error.release_value();
|
||||
interpreter.accumulator() = Value(iterator_complete(interpreter.global_object(), *iterator_result));
|
||||
|
||||
auto complete_or_error = iterator_complete(interpreter.global_object(), *iterator_result);
|
||||
if (complete_or_error.is_error())
|
||||
return;
|
||||
auto complete = complete_or_error.release_value();
|
||||
|
||||
interpreter.accumulator() = Value(complete);
|
||||
}
|
||||
|
||||
void IteratorResultValue::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
|
||||
Reference in New Issue
Block a user