Introduce new Promise API methods (#3186)

The new API methods make it possible to get a Promise object's
result and it's state.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
Péter Gál
2019-10-28 14:07:37 +01:00
committed by Dániel Bátyai
parent 351b88184c
commit eebbed143d
6 changed files with 440 additions and 3 deletions
@@ -71,6 +71,8 @@ typedef struct
bool ecma_is_promise (ecma_object_t *obj_p);
ecma_value_t
ecma_op_create_promise_object (ecma_value_t executor, ecma_promise_executor_type_t type);
uint8_t ecma_promise_get_state (ecma_object_t *promise_p);
ecma_value_t ecma_promise_get_result (ecma_object_t *promise_p);
ecma_value_t ecma_promise_new_capability (void);
ecma_value_t
ecma_promise_then (ecma_value_t promise,