From 8fe9ca416dabd6939103e240b2b97c9ff9bac2c6 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Wed, 17 Jul 2019 14:39:56 -0400 Subject: doc: amplify warning for execute callback Add specific recommendation not to use the to the napi-env parameter in napi_async_execute_callback PR-URL: https://github.com/nodejs/node/pull/28738 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- doc/api/n-api.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 8a669b5633..0a89781970 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -463,6 +463,8 @@ Implementations of this type of function should avoid making any N-API calls that could result in the execution of JavaScript or interaction with JavaScript objects. Most often, any code that needs to make N-API calls should be made in `napi_async_complete_callback` instead. +Avoid using the `napi_env` parameter in the execute callback as +it will likely execute JavaScript. #### napi_async_complete_callback