n-api: finalize during second-pass callback · nodejs/node@2b2ad96 · GitHub
Skip to content

Commit 2b2ad96

Browse files
Gabriel SchulhofBethGriggs
authored andcommitted
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: #25927 PR-URL: #25992 Backport-PR-URL: #26060 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent ac9b8f7 commit 2b2ad96

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/node_api.cc

Lines changed: 15 additions & 0 deletions

0 commit comments

Comments
 (0)