mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibJS: Rename IterableToList to IteratorToList
This is an editorial change in the ECMA-262 spec. See: https://github.com/tc39/ecma262/commit/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:
committed by
Andreas Kling
parent
1760361304
commit
a7a109062a
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user