mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-01 12:00:27 +00:00
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()) \
|
||||
return {}; \
|
||||
} 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()) \
|
||||
return {}; \
|
||||
if (iterator.is_function()) { \
|
||||
if (iterator) { \
|
||||
auto values = iterable_to_list(global_object(), first_argument, iterator); \
|
||||
if (vm.exception()) \
|
||||
return {}; \
|
||||
|
|
Loading…
Reference in a new issue