Skip to content

[v8.x] n-api: finalize during second-pass callback

Calling into the engine from a weak callback is unsafe, however, the engine offers a way to attach a second-pass weak callback which gets called when it is safe to call into JavaScript. This moves the point at which the N-API finalize callback gets called to this latter point.

Fixes: https://github.com/nodejs/node/issues/25927 PR-URL: https://github.com/nodejs/node/pull/25992 Backport-PR-URL: https://github.com/nodejs/node/pull/26058

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading