SplitMatch operation should not set its return array element with [[Put]]
Related issue: #1076 JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
This commit is contained in:
@@ -1564,7 +1564,14 @@ ecma_builtin_helper_split_match (ecma_value_t input_string, /**< first argument
|
||||
ecma_object_t *match_array_p = ecma_get_object_from_value (match_array);
|
||||
ecma_string_t *zero_str_p = ecma_new_ecma_string_from_number (ECMA_NUMBER_ZERO);
|
||||
|
||||
ecma_op_object_put (match_array_p, zero_str_p, ecma_make_string_value (separator_str_p), true);
|
||||
ecma_value_t put_comp = ecma_builtin_helper_def_prop (match_array_p,
|
||||
zero_str_p,
|
||||
ecma_make_string_value (separator_str_p),
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true);
|
||||
JERRY_ASSERT (ecma_is_value_true (put_comp));
|
||||
|
||||
ecma_string_t *magic_index_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_INDEX);
|
||||
ecma_property_t *index_prop_p = ecma_create_named_data_property (match_array_p,
|
||||
|
||||
Reference in New Issue
Block a user