Add support for aborts. (#2176)

Aborts are similar to exceptions except they are not caught by catch
and finally blocks. Callbacks should honor aborts as well and return
them without processing them. Aborts are never thrown by JavaScript
code.

In the future certain events such as out-of-memory condition may
also throw aborts.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2018-01-30 01:13:44 +01:00
committed by yichoi
parent b548eae4ad
commit 918eb22a01
17 changed files with 477 additions and 144 deletions
+1
View File
@@ -2744,6 +2744,7 @@ parser_parse_script (const uint8_t *arg_list_p, /**< function argument list */
/* It is unlikely that memory can be allocated in an out-of-memory
* situation. However, a simple value can still be thrown. */
JERRY_CONTEXT (error_value) = ECMA_VALUE_NULL;
JERRY_CONTEXT (status_flags) |= ECMA_STATUS_EXCEPTION;
return ECMA_VALUE_ERROR;
}
#ifdef JERRY_ENABLE_ERROR_MESSAGES