Skip to content

n-api: keep napi_env alive while it has finalizers

Manage the napi_env refcount from Finalizer instances, as the finalizer may refer to the napi_env until it is deleted.

Fixes: https://github.com/nodejs/node/issues/31134 Fixes: https://github.com/node-ffi-napi/node-ffi-napi/issues/48

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading