From 1064b19cfb15eaecd9f8606a975f028a55c861a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Csaba=20Osztrogon=C3=A1c?= Date: Wed, 1 Jul 2020 12:03:49 +0200 Subject: [PATCH] Class accessors shouldn't be enumerable. (#3961) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reference: https://www.ecma-international.org/ecma-262/11.0/index.html#sec-runtime-semantics-classdefinitionevaluation 21.a,b JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu --- jerry-core/vm/opcodes.c | 1 + tests/test262-es6-excludelist.xml | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/jerry-core/vm/opcodes.c b/jerry-core/vm/opcodes.c index 7297b9c91..681588f12 100644 --- a/jerry-core/vm/opcodes.c +++ b/jerry-core/vm/opcodes.c @@ -1215,6 +1215,7 @@ opfunc_set_class_attributes (ecma_object_t *obj_p, /**< object */ } else if (ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR) { + property_pair_p->header.types[index] = (uint8_t) (property & ~ECMA_PROPERTY_FLAG_ENUMERABLE); ecma_property_value_t *accessor_objs_p = property_pair_p->values + index; ecma_getter_setter_pointers_t *get_set_pair_p = ecma_get_named_accessor_property (accessor_objs_p); diff --git a/tests/test262-es6-excludelist.xml b/tests/test262-es6-excludelist.xml index 6d3788a73..d97a2bb0f 100644 --- a/tests/test262-es6-excludelist.xml +++ b/tests/test262-es6-excludelist.xml @@ -344,11 +344,8 @@ - - -