Remove string copy
Changed 'ecma_copy_or_ref_ecma_string' to 'ecma_ref_ecma_string'. It does not copy the string if the maximum number of reference counter is reached, but bails out with an error like the 'ecma_ref_object' function does. JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
@@ -751,7 +751,7 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
|
||||
|
||||
JERRY_ASSERT (name_pos > 0
|
||||
&& name_pos <= array_index_named_properties_count + string_named_properties_count);
|
||||
names_p[--name_pos] = ecma_copy_or_ref_ecma_string (name_p);
|
||||
names_p[--name_pos] = ecma_ref_ecma_string (name_p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user