mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 17:16:04 +00:00
LibJS: Implement the IteratorClose abstract op and use it where needed
This commit is contained in:
parent
3e4b48f68e
commit
2100b46d02
Notes:
sideshowbarker
2024-07-18 12:14:04 +09:00
Author: https://github.com/IdanHo
Commit: 2100b46d02
Pull-request: https://github.com/SerenityOS/serenity/pull/8049
Reviewed-by: https://github.com/linusg ✅
4 changed files with 46 additions and 8 deletions
|
@ -27,6 +27,10 @@ void iterator_close(Object& iterator);
|
|||
|
||||
MarkedValueList iterable_to_list(GlobalObject&, Value iterable, Value method = {});
|
||||
|
||||
void get_iterator_values(GlobalObject&, Value value, AK::Function<IterationDecision(Value)> callback, Value method = {});
|
||||
enum class CloseOnAbrupt {
|
||||
No,
|
||||
Yes
|
||||
};
|
||||
void get_iterator_values(GlobalObject&, Value value, AK::Function<IterationDecision(Value)> callback, Value method = {}, CloseOnAbrupt close_on_abrupt = CloseOnAbrupt::Yes);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue