LibJS: Use the GetMethod AO for creating a TypedArray from an iterable
This commit is contained in:
parent
086b6f11c4
commit
3b81a7420e
Notes:
sideshowbarker
2024-07-18 10:23:51 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/3b81a7420ef Pull-request: https://github.com/SerenityOS/serenity/pull/8446 Reviewed-by: https://github.com/linusg
1 changed files with 2 additions and 2 deletions
|
@ -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 {}; \
|
||||||
|
|
Loading…
Add table
Reference in a new issue