Skip to content

Commit

Permalink
Fix the private field crash for the Array object.
Browse files Browse the repository at this point in the history
  • Loading branch information
paintedveil5 committed Apr 20, 2024
1 parent 47bd5d4 commit ac0071a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jerry-core/vm/opcodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,11 @@ opfunc_private_method_or_accessor_add (ecma_object_t *class_object_p, /**< the f

JERRY_ASSERT (prop_name_p->u.hash & ECMA_SYMBOL_FLAG_PRIVATE_INSTANCE_METHOD);

if (ecma_op_object_is_fast_array (this_obj_p))
{
ecma_fast_array_convert_to_normal (this_obj_p);
}

prop_p = ecma_find_named_property (this_obj_p, prop_name_p);
ecma_object_t *method_p = ecma_get_object_from_value (method);

Expand Down

0 comments on commit ac0071a

Please sign in to comment.