master src: wrap finalizer callback

Make sure C++ exceptions thrown from a finalizer are converted into
JS exceptions just as they are in regular callbacks.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: https://github.com/nodejs/node-addon-api/pull/762
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

test: add finalizer exception test

src: wrap finalizer callback

Gabriel Schulhof authored and committed

Push event #2 passed

  • Ran for
  • Total time