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:
@@ -53,7 +53,7 @@ ecma_is_promise (ecma_object_t *obj_p) /**< points to object */
|
||||
* @return ecma value of the promise result.
|
||||
* Returned value must be freed with ecma_free_value
|
||||
*/
|
||||
static inline ecma_value_t
|
||||
ecma_value_t
|
||||
ecma_promise_get_result (ecma_object_t *obj_p) /**< points to promise object */
|
||||
{
|
||||
JERRY_ASSERT (ecma_is_promise (obj_p));
|
||||
@@ -84,7 +84,7 @@ ecma_promise_set_result (ecma_object_t *obj_p, /**< points to promise object */
|
||||
*
|
||||
* @return the state's enum value
|
||||
*/
|
||||
static inline uint8_t JERRY_ATTR_ALWAYS_INLINE
|
||||
uint8_t
|
||||
ecma_promise_get_state (ecma_object_t *obj_p) /**< points to promise object */
|
||||
{
|
||||
JERRY_ASSERT (ecma_is_promise (obj_p));
|
||||
|
||||
Reference in New Issue
Block a user