LibJS: Use the GetMethod AO for creating a TypedArray from an iterable

This commit is contained in:
Idan Horowitz 2021-07-05 02:41:38 +03:00 committed by Linus Groh
parent 086b6f11c4
commit 3b81a7420e
Notes: sideshowbarker 2024-07-18 10:23:51 +09:00

View File

@ -294,10 +294,10 @@ void TypedArrayBase::visit_edges(Visitor& visitor)
if (vm.exception()) \ if (vm.exception()) \
return {}; \ return {}; \
} else { \ } else { \
auto iterator = first_argument.as_object().get(*vm.well_known_symbol_iterator()); \ auto iterator = first_argument.get_method(global_object(), *vm.well_known_symbol_iterator()); \
if (vm.exception()) \ if (vm.exception()) \
return {}; \ return {}; \
if (iterator.is_function()) { \ if (iterator) { \
auto values = iterable_to_list(global_object(), first_argument, iterator); \ auto values = iterable_to_list(global_object(), first_argument, iterator); \
if (vm.exception()) \ if (vm.exception()) \
return {}; \ return {}; \