Files
node/src
Gabriel Schulhof 503370e2d3 n-api: implement promise
Promise is implemented as a pair of objects. `napi_create_promise()`
returns both a JavaScript promise and a newly allocated "deferred" in
its out-params. The deferred is linked to the promise such that the
deferred can be passed to `napi_resolve_deferred()` or
`napi_reject_deferred()` to reject/resolve the promise.

`napi_is_promise()` can be used to check if a `napi_value` is a native
promise - that is, a promise created by the underlying engine, rather
than a pure JS implementation of a promise.

PR-URL: https://github.com/nodejs/node/pull/14365
Fixes: https://github.com/nodejs/abi-stable-node/issues/242
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-09-12 03:17:16 +02:00
..
2017-08-14 13:19:23 +02:00
2017-08-14 13:20:43 +02:00
2017-08-12 22:00:26 +02:00
2017-08-14 13:19:23 +02:00
2017-09-12 03:17:16 +02:00
2017-09-12 03:17:16 +02:00
2017-09-12 03:17:16 +02:00
2017-08-02 12:02:57 +02:00
2017-08-14 13:19:23 +02:00
2016-06-28 21:21:21 +02:00
2017-08-15 15:03:56 -05:00
2017-09-12 03:17:02 +02:00
2012-02-03 14:07:32 +00:00
2017-08-14 13:20:08 +02:00
2017-08-14 13:19:23 +02:00
2017-07-27 23:48:54 +02:00
2017-05-23 11:39:13 -07:00
2017-07-27 23:48:54 +02:00
2017-07-27 23:48:54 +02:00
2017-04-14 22:47:29 +02:00
2016-06-28 21:21:21 +02:00