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:
László Langó
2016-06-14 13:51:44 +02:00
parent 7a3ed2650d
commit 0daeb2f942
18 changed files with 36 additions and 117 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ ecma_new_standard_error_with_message (ecma_standard_error_t error_type, /**< nat
ECMA_PROPERTY_CONFIGURABLE_WRITABLE);
ecma_set_named_data_property_value (prop_p,
ecma_make_string_value (ecma_copy_or_ref_ecma_string (message_string_p)));
ecma_make_string_value (ecma_ref_ecma_string (message_string_p)));
ecma_deref_ecma_string (message_magic_string_p);
return new_error_obj_p;