diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-10-20 13:36:14 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-10-21 00:26:45 +0100 |
commit | ec54a7b5b09f7f86c99c247477b29267a274991b (patch) | |
tree | 3da224b62570ae2a232a63b29cc9086d9757fbbb /Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp | |
parent | 04b4307b3d57a4c48abfa19a22d4745b23760d78 (diff) | |
download | serenity-ec54a7b5b09f7f86c99c247477b29267a274991b.zip |
LibJS: Implement IteratorClose with Completions and align to the spec
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp index ecc42e189e..f2a3c302ec 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp @@ -63,8 +63,7 @@ ThrowCompletionOr<MarkedValueList> iterable_to_list_of_type(GlobalObject& global // 1. Let completion be ThrowCompletion(a newly created TypeError object). auto completion = vm.throw_completion<TypeError>(global_object, ErrorType::IterableToListOfTypeInvalidValue, next_value.to_string_without_side_effects()); // 2. Return ? IteratorClose(iteratorRecord, completion). - iterator_close(*iterator_record); - return completion; + return iterator_close(*iterator_record, move(completion)); } // iii. Append nextValue to the end of the List values. values.append(next_value); |