Stop after the first matching property in the prototype chain (#4543)

If multiple properties with the same name is in the
prototype chain, only the first one should be inspected

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-01-26 14:57:10 +01:00
committed by GitHub
parent ff1a99b999
commit b5bf97c657
2 changed files with 57 additions and 4 deletions
+4 -4
View File
@@ -1531,11 +1531,11 @@ ecma_op_object_put_with_receiver (ecma_object_t *object_p, /**< the object */
{
setter_cp = ecma_get_named_accessor_property (property_ref.value_p)->setter_cp;
create_new_property = false;
break;
}
else
{
create_new_property = ecma_is_property_writable (inherited_property);
}
create_new_property = ecma_is_property_writable (inherited_property);
break;
}
}