1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

LibJS: Rename IterableToList to IteratorToList

This is an editorial change in the ECMA-262 spec. See:
ff60140

In doing so, as the new name implies, callsites are updated to pass in
an IteratorRecord themselves, rather than an iterable value.
This commit is contained in:
Timothy Flynn 2023-07-18 15:02:28 -04:00 committed by Andreas Kling
parent 1760361304
commit a7a109062a
6 changed files with 12 additions and 25 deletions

View file

@ -203,7 +203,7 @@ JS::ThrowCompletionOr<size_t> instantiate_module(JS::VM& vm, Wasm::Module const&
if (method == JS::js_undefined())
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotIterable, TRY_OR_THROW_OOM(vm, result.to_string_without_side_effects()));
auto values = TRY(JS::iterable_to_list(vm, result, method));
auto values = TRY(JS::iterator_to_list(vm, TRY(JS::get_iterator_from_method(vm, result, *method))));
if (values.size() != type.results().size())
return vm.throw_completion<JS::TypeError>(DeprecatedString::formatted("Invalid number of return values for multi-value wasm return of {} objects", type.results().size()));