Revise the usage of the global error value/exception flag (#3426)

This patch also fixes #3422.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-12-10 14:42:10 +01:00
committed by Zoltan Herczeg
parent 7c0b1ca88a
commit 9b33fc8cbd
28 changed files with 238 additions and 108 deletions
+2 -4
View File
@@ -179,8 +179,7 @@ ecma_process_promise_reaction_job (void *obj_p) /**< the job to be operated */
{
if (ECMA_IS_VALUE_ERROR (handler_result))
{
handler_result = JERRY_CONTEXT (error_value);
JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_EXCEPTION;
handler_result = jcontext_take_exception ();
}
/* 7. */
@@ -254,8 +253,7 @@ ecma_process_promise_resolve_thenable_job (void *obj_p) /**< the job to be opera
if (ECMA_IS_VALUE_ERROR (then_call_result))
{
then_call_result = JERRY_CONTEXT (error_value);
JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_EXCEPTION;
then_call_result = jcontext_take_exception ();
ret = ecma_op_function_call (ecma_get_object_from_value (funcs->reject),
ECMA_VALUE_UNDEFINED,