Lines Matching defs:promise
39 #include "ecma-promise-object.h"
827 * Check if the specified value is promise.
829 * @return true - if the specified value is promise,
3299 * Resolve or reject the promise with an argument.
3305 jerry_resolve_or_reject_promise (jerry_value_t promise, /**< the promise value */
3307 bool is_resolve) /**< whether the promise should be resolved or rejected */
3312 if (!ecma_is_value_object (promise) || !ecma_is_promise (ecma_get_object_from_value (promise)))
3325 ecma_value_t function = ecma_op_object_get_by_magic_id (ecma_get_object_from_value (promise), prop_name);
3336 JERRY_UNUSED (promise);
3345 * Get the result of a promise.
3348 * - Type error if the promise support was not enabled or the input was not a promise object
3351 jerry_get_promise_result (const jerry_value_t promise) /**< promise object to get the result from */
3356 if (!jerry_value_is_promise (promise))
3361 return ecma_promise_get_result (ecma_get_object_from_value (promise));
3363 JERRY_UNUSED (promise);
3369 * Get the state of a promise object.
3371 * @return - the state of the promise (one of the jerry_promise_state_t enum values)
3372 * - JERRY_PROMISE_STATE_NONE is only returned if the input is not a promise object
3373 * or the promise support was not enabled.
3376 jerry_get_promise_state (const jerry_value_t promise) /**< promise object to get the state from */
3381 if (!jerry_value_is_promise (promise))
3386 uint16_t flags = ecma_promise_get_flags (ecma_get_object_from_value (promise));
3391 JERRY_UNUSED (promise);