Commit c32c5f0d authored by Michael Dawson's avatar Michael Dawson
Browse files

node-api: fix shutdown crashes

Refs: https://github.com/nodejs/node-addon-api/issues/906



Ensure that finalization is not defered during shutdown.
The env for the addon is deleted immediately after
iterating the list of finalizers to be run. Defering
causes crashes as the finalization uses the already
deleted env.

Signed-off-by: default avatarMichael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/38492


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarChengzhong Wu <legendecas@gmail.com>
Reviewed-By: default avatarGabriel Schulhof <gabrielschulhof@gmail.com>
parent 3f025cb5
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment