n-api: back up env before async work finalize
We must back up the value of `_env` before calling the async work complete callback, because the complete callback may delete the instance in which `_env` is stored by calling `napi_delete_async_work`, and because we need to use it after the complete callback has completed. Fixes: https://github.com/nodejs/node/issues/20966 PR-URL: https://github.com/nodejs/node/pull/21129 Reviewed-By:Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
parent
1aa582a9
Please register or sign in to comment