Files
node/doc/api
Jason Ginchereau 2e3fef7628 n-api: Handle fatal exception in async callback
- Create a handle scope before invoking the async completion
   callback, because it is basically always needed, easy for user
   code to forget, and this makes it more consistent with ordinary
   N-API function callbacks.

 - Check for an unhandled JS exception after invoking an async
   completion callback, and report it via `node::FatalException()`.

 - Add a corresponding test case for an exception in async callback.

Previously, any unhandled JS exception thrown from a
`napi_async_complete_callback` would be silently ignored. Among other
things this meant assertions in some test cases could be undetected.

PR-URL: https://github.com/nodejs/node/pull/12838
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-09 15:17:36 -04:00
..
2017-05-08 09:30:55 -07:00
2017-04-25 00:06:17 +03:00
2017-05-08 09:30:55 -07:00
2017-04-25 00:06:17 +03:00
2017-04-25 00:06:17 +03:00
2017-05-09 21:15:57 +03:00
2017-05-09 15:01:44 +02:00
2017-05-08 09:30:55 -07:00
2016-12-20 12:31:09 -08:00
2016-12-08 13:39:45 -05:00
2017-05-08 09:30:55 -07:00
2017-05-09 15:01:41 +02:00
2017-05-08 09:30:55 -07:00
2017-05-08 09:30:55 -07:00