From e70626f92d0a4bfbb13462d7e915a718864bd1e0 Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Wed, 14 Jan 2015 18:14:28 +0300 Subject: [PATCH] Removing free of throw completion value in ECMA_TRY_CATCH macro, instead just copying it to the return value variable. --- src/libecmaoperations/ecma-try-catch-macro.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libecmaoperations/ecma-try-catch-macro.h b/src/libecmaoperations/ecma-try-catch-macro.h index 07b6d6511..c469433d4 100644 --- a/src/libecmaoperations/ecma-try-catch-macro.h +++ b/src/libecmaoperations/ecma-try-catch-macro.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ ecma_completion_value_t var = op; \ if (unlikely (ecma_is_completion_value_throw (var))) \ { \ - return_value = ecma_copy_completion_value (var); \ + return_value = var; \ } \ else \ { \ @@ -47,8 +47,8 @@ * Each ECMA_TRY_CATCH should be followed by ECMA_FINALIZE with same argument * as corresponding ECMA_TRY_CATCH's first argument. */ -#define ECMA_FINALIZE(var) } \ - ecma_free_completion_value (var) +#define ECMA_FINALIZE(var) ecma_free_completion_value (var); \ + } /** * The macro defines try-block that tries to perform ToNumber operation on given value