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:
@@ -360,6 +360,7 @@ bool jerry_backtrace_is_strict (jerry_backtrace_frame_t *frame_p);
|
||||
* Miscellaneous functions.
|
||||
*/
|
||||
void jerry_set_vm_exec_stop_callback (jerry_vm_exec_stop_callback_t stop_cb, void *user_p, uint32_t frequency);
|
||||
void jerry_set_vm_throw_callback (jerry_vm_throw_callback_t throw_cb, void *user_p);
|
||||
jerry_value_t jerry_get_resource_name (const jerry_value_t value);
|
||||
jerry_value_t jerry_get_user_value (const jerry_value_t value);
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ typedef enum
|
||||
JERRY_FEATURE_SNAPSHOT_EXEC, /**< executing snapshot files */
|
||||
JERRY_FEATURE_DEBUGGER, /**< debugging */
|
||||
JERRY_FEATURE_VM_EXEC_STOP, /**< stopping ECMAScript execution */
|
||||
JERRY_FEATURE_VM_THROW, /**< capturing ECMAScript throws */
|
||||
JERRY_FEATURE_JSON, /**< JSON support */
|
||||
JERRY_FEATURE_PROMISE, /**< promise support */
|
||||
JERRY_FEATURE_TYPEDARRAY, /**< Typedarray support */
|
||||
@@ -306,6 +307,15 @@ typedef void (*jerry_error_object_created_callback_t) (const jerry_value_t error
|
||||
*/
|
||||
typedef jerry_value_t (*jerry_vm_exec_stop_callback_t) (void *user_p);
|
||||
|
||||
/**
|
||||
* Callback function which is called when an error is thrown in an ECMAScript code.
|
||||
* The callback should not change the error_value. The callback is not called again
|
||||
* until the value is caught.
|
||||
*
|
||||
* Note: the engine considers errors thrown by external functions as never caught.
|
||||
*/
|
||||
typedef void (*jerry_vm_throw_callback_t) (const jerry_value_t error_value, void *user_p);
|
||||
|
||||
/**
|
||||
* Function type applied for each data property of an object.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user