Add stack-overflow check for general [[Construct]] method of function objects (#4945)

This patch fixes #4901

JerryScript-DCO-1.0-Signed-off-by: Martin Negyokru negyokru@inf.u-szeged.hu
This commit is contained in:
mnegyokru
2022-01-10 16:27:39 +01:00
committed by GitHub
parent f3a420b672
commit 58e504f1f4
3 changed files with 28 additions and 2 deletions
@@ -1769,6 +1769,8 @@ ecma_op_function_construct (ecma_object_t *func_obj_p, /**< Function object */
{
JERRY_ASSERT (func_obj_p != NULL && !ecma_is_lexical_environment (func_obj_p));
ECMA_CHECK_STACK_USAGE ();
switch (ecma_get_object_type (func_obj_p))
{
case ECMA_OBJECT_TYPE_FUNCTION: