Fix third parameter of forEach callback function in Map and Set (#3565)

There was a problem with passing third parameter to callback.

This patch fixes #3564

JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
This commit is contained in:
rwalczyna
2020-02-18 19:22:08 +01:00
committed by GitHub
parent 0ff664cab6
commit 98b90ba697
3 changed files with 20 additions and 2 deletions
@@ -591,9 +591,9 @@ ecma_op_container_foreach (ecma_value_t this_arg, /**< this argument */
}
}
ecma_value_t call_args[] = { value, key_arg };
ecma_value_t call_args[] = { value, key_arg, this_arg };
ecma_value_t call_value = ecma_op_function_call (func_object_p, predicate_this_arg, call_args, 2);
ecma_value_t call_value = ecma_op_function_call (func_object_p, predicate_this_arg, call_args, 3);
ecma_free_value (value);