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:
@@ -902,7 +902,7 @@ ecma_free_unused_memory (jmem_free_unused_memory_severity_t severity) /**< sever
|
||||
{
|
||||
--JERRY_CONTEXT (ecma_prop_hashmap_alloc_state);
|
||||
}
|
||||
JERRY_CONTEXT (ecma_prop_hashmap_alloc_last_is_hs_gc) = false;
|
||||
JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_HIGH_SEV_GC;
|
||||
#endif /* !CONFIG_ECMA_PROPERTY_HASHMAP_DISABLE */
|
||||
|
||||
/*
|
||||
@@ -921,14 +921,14 @@ ecma_free_unused_memory (jmem_free_unused_memory_severity_t severity) /**< sever
|
||||
JERRY_ASSERT (severity == JMEM_FREE_UNUSED_MEMORY_SEVERITY_HIGH);
|
||||
|
||||
#ifndef CONFIG_ECMA_PROPERTY_HASHMAP_DISABLE
|
||||
if (JERRY_CONTEXT (ecma_prop_hashmap_alloc_last_is_hs_gc))
|
||||
if (JERRY_CONTEXT (status_flags) & ECMA_STATUS_HIGH_SEV_GC)
|
||||
{
|
||||
JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) = ECMA_PROP_HASHMAP_ALLOC_MAX;
|
||||
}
|
||||
else if (JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) < ECMA_PROP_HASHMAP_ALLOC_MAX)
|
||||
{
|
||||
++JERRY_CONTEXT (ecma_prop_hashmap_alloc_state);
|
||||
JERRY_CONTEXT (ecma_prop_hashmap_alloc_last_is_hs_gc) = true;
|
||||
JERRY_CONTEXT (status_flags) |= ECMA_STATUS_HIGH_SEV_GC;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_PROPERTY_HASHMAP_DISABLE */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user