From b9258da7d06e6d3ff188189d9db092c8b55a51bb Mon Sep 17 00:00:00 2001 From: Robert Fancsik Date: Mon, 25 May 2020 12:57:25 +0200 Subject: [PATCH] Accessor functions should not have 'prototype' property (#3781) JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu --- jerry-core/ecma/operations/ecma-function-object.c | 4 ++-- tests/test262-es6-excludelist.xml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/jerry-core/ecma/operations/ecma-function-object.c b/jerry-core/ecma/operations/ecma-function-object.c index cb5fb596a..9cca4ab9f 100644 --- a/jerry-core/ecma/operations/ecma-function-object.c +++ b/jerry-core/ecma/operations/ecma-function-object.c @@ -1326,7 +1326,7 @@ ecma_op_lazy_instantiate_prototype_object (ecma_object_t *object_p) /**< the fun ECMA_OBJECT_TYPE_GENERAL); init_constructor = false; } - else if (byte_code_p->status_flags & CBC_CODE_FLAGS_ARROW_FUNCTION) + else if (byte_code_p->status_flags & (CBC_CODE_FLAGS_ARROW_FUNCTION | CBC_CODE_FLAGS_ACCESSOR)) { return NULL; } @@ -1616,7 +1616,7 @@ ecma_op_function_list_lazy_property_names (ecma_object_t *object_p, /**< functio bytecode_data_p = ecma_op_function_get_compiled_code ((ecma_extended_object_t *) object_p); #if ENABLED (JERRY_ES2015) - if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_ARROW_FUNCTION) + if (bytecode_data_p->status_flags & (CBC_CODE_FLAGS_ARROW_FUNCTION | CBC_CODE_FLAGS_ACCESSOR)) { return; } diff --git a/tests/test262-es6-excludelist.xml b/tests/test262-es6-excludelist.xml index 81715821a..276593022 100644 --- a/tests/test262-es6-excludelist.xml +++ b/tests/test262-es6-excludelist.xml @@ -68,7 +68,6 @@ -