Implement vm_throw callback (#4726)

Slightly improve the description of vm_exec_stop callback.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-08-10 15:50:26 +02:00
committed by GitHub
parent b6ec9275aa
commit 444806d78a
15 changed files with 399 additions and 22 deletions
+5 -2
View File
@@ -113,8 +113,11 @@ jcontext_take_exception (void)
{
JERRY_ASSERT (jcontext_has_pending_exception ());
jcontext_set_abort_flag (false);
jcontext_set_exception_flag (false);
JERRY_CONTEXT (status_flags) &= (uint32_t) ~(ECMA_STATUS_EXCEPTION
#if JERRY_VM_THROW
| ECMA_STATUS_ERROR_THROWN
#endif /* JERRY_VM_THROW */
| ECMA_STATUS_ABORT);
return JERRY_CONTEXT (error_value);
} /* jcontext_take_exception */
+5
View File
@@ -200,6 +200,11 @@ struct jerry_context_t
* ECMAScript execution should be stopped */
#endif /* JERRY_VM_EXEC_STOP */
#if JERRY_VM_THROW
void *vm_throw_callback_user_p; /**< user pointer for vm_throw_callback_p */
jerry_vm_throw_callback_t vm_throw_callback_p; /**< callback for capturing throws */
#endif /* JERRY_VM_THROW */
#if (JERRY_STACK_LIMIT != 0)
uintptr_t stack_base; /**< stack base marker */
#endif /* (JERRY_STACK_LIMIT != 0) */