1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

LibJS: Make GetIterator's hint parameter required

This is an editorial change in the ECMA-262 spec. See:
2562811
This commit is contained in:
Timothy Flynn 2023-07-18 14:52:21 -04:00 committed by Andreas Kling
parent 5703833116
commit 1760361304
7 changed files with 25 additions and 26 deletions

View file

@ -1295,7 +1295,7 @@ Completion ForAwaitOfStatement::loop_evaluation(Interpreter& interpreter, Vector
auto rhs_result = for_of_head_state.rhs_value;
// NOTE: Perform step 7 from ForIn/OfHeadEvaluation. And since this is always async we only have to do step 7.d.
// d. Return ? GetIterator(exprValue, iteratorHint).
// d. Return ? GetIterator(exprValue, iteratorKind).
auto iterator = TRY(get_iterator(vm, rhs_result, IteratorHint::Async));
// 14.7.5.7 ForIn/OfBodyEvaluation ( lhs, stmt, iteratorRecord, iterationKind, lhsKind, labelSet [ , iteratorKind ] ), https://tc39.es/ecma262/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset