Skip to content

Commit b9258da

Browse files
authored
Accessor functions should not have 'prototype' property (#3781)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
1 parent 6cd309b commit b9258da

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

jerry-core/ecma/operations/ecma-function-object.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ ecma_op_lazy_instantiate_prototype_object (ecma_object_t *object_p) /**< the fun
13261326
ECMA_OBJECT_TYPE_GENERAL);
13271327
init_constructor = false;
13281328
}
1329-
else if (byte_code_p->status_flags & CBC_CODE_FLAGS_ARROW_FUNCTION)
1329+
else if (byte_code_p->status_flags & (CBC_CODE_FLAGS_ARROW_FUNCTION | CBC_CODE_FLAGS_ACCESSOR))
13301330
{
13311331
return NULL;
13321332
}
@@ -1616,7 +1616,7 @@ ecma_op_function_list_lazy_property_names (ecma_object_t *object_p, /**< functio
16161616
bytecode_data_p = ecma_op_function_get_compiled_code ((ecma_extended_object_t *) object_p);
16171617

16181618
#if ENABLED (JERRY_ES2015)
1619-
if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_ARROW_FUNCTION)
1619+
if (bytecode_data_p->status_flags & (CBC_CODE_FLAGS_ARROW_FUNCTION | CBC_CODE_FLAGS_ACCESSOR))
16201620
{
16211621
return;
16221622
}

tests/test262-es6-excludelist.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
<test id="built-ins/Function/prototype/bind/instance-name-non-string.js"><reason></reason></test>
6969
<test id="built-ins/Function/prototype/name.js"><reason></reason></test>
7070
<test id="built-ins/Function/prototype/Symbol.hasInstance/name.js"><reason></reason></test>
71-
<test id="built-ins/Function/prototype/Symbol.hasInstance/this-val-poisoned-prototype.js"><reason></reason></test>
7271
<test id="built-ins/Function/StrictFunction_restricted-properties.js"><reason></reason></test>
7372
<test id="built-ins/GeneratorFunction/instance-name.js"><reason></reason></test>
7473
<test id="built-ins/GeneratorFunction/instance-restricted-properties.js"><reason></reason></test>

0 commit comments

Comments
 (0)