mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
b7a341d7e5
N-API is somewhat strict about blocking calls to many APIs while there is a pending exception. The NAPI_PREAMBLE macro at the beginning of many API implementations checks for a pending exception. However, a subset of the APIs (which don't call back into JavaScript) still need to work while in a pending-exception state. This changes the reference APIs (equivalent to v8::Persistent) and handle scope APIs so that they can be used for cleanup up while an exception is pending. We may decide to similarly enable a few other APIs later, (which would be a non-breaking change) but we know at least these are needed now to unblock some specific scenarios. Fixes: https://github.com/nodejs/abi-stable-node/issues/122 Fixes: https://github.com/nodejs/abi-stable-node/issues/228 PR-URL: https://github.com/nodejs/node/pull/12524 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> |
||
---|---|---|
.. | ||
binding.gyp | ||
test_handle_scope.c | ||
test.js |