aboutsummaryrefslogtreecommitdiff
path: root/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c
diff options
context:
space:
mode:
authorZoltan Herczeg <zherczeg.u-szeged@partner.samsung.com>2018-03-01 13:31:15 +0100
committerGitHub <noreply@github.com>2018-03-01 13:31:15 +0100
commitd60d4dbba9a49667079aa2a0d4d669397a823c1a (patch)
tree8e54c0f256ed64c5d10d6df906cc13a2da72f94e /jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c
parent26ee8f713716f8eba0ac4044188aeb513ecbb0cd (diff)
Improve magic string handling. (#2221)
Remove unnecessary ref / deref calls when magic strings are used. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Diffstat (limited to 'jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c')
-rw-r--r--jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c
index d7f11778..f1f900b6 100644
--- a/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c
+++ b/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c
@@ -74,9 +74,7 @@ ecma_builtin_error_prototype_object_to_string (ecma_value_t this_arg) /**< this
if (ecma_is_value_undefined (name_get_ret_value))
{
- ecma_string_t *error_magic_string_p = ecma_get_magic_string (LIT_MAGIC_STRING_ERROR_UL);
-
- name_to_str_completion = ecma_make_string_value (error_magic_string_p);
+ name_to_str_completion = ecma_make_magic_string_value (LIT_MAGIC_STRING_ERROR_UL);
}
else
{
@@ -97,9 +95,7 @@ ecma_builtin_error_prototype_object_to_string (ecma_value_t this_arg) /**< this
if (ecma_is_value_undefined (msg_get_ret_value))
{
- ecma_string_t *empty_magic_string_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);
-
- msg_to_str_completion = ecma_make_string_value (empty_magic_string_p);
+ msg_to_str_completion = ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);
}
else
{