node-api: use Node-API in comments · nodejs/node@179162f
@@ -56,10 +56,10 @@ static void ThrowNodeApiVersionError(node::Environment* node_env,
5656 result = new node_napi_env__(context, module_filename, module_api_version);
5757// TODO(addaleax): There was previously code that tried to delete the
5858// napi_env when its v8::Context was garbage collected;
59-// However, as long as N-API addons using this napi_env are in place,
59+// However, as long as Node-API addons using this napi_env are in place,
6060// the Context needs to be accessible and alive.
6161// Ideally, we'd want an on-addon-unload hook that takes care of this
62-// once all N-API addons using this napi_env are unloaded.
62+// once all Node-API addons using this napi_env are unloaded.
6363// For now, a per-Environment cleanup hook is the best we can do.
6464 result->node_env()->AddCleanupHook(
6565 [](void* arg) { static_cast<napi_env>(arg)->Unref(); },
@@ -150,7 +150,7 @@ void node_napi_env__::CallbackIntoModule(T&& call) {
150150 !enforceUncaughtExceptionPolicy) {
151151ProcessEmitDeprecationWarning(
152152 node_env,
153-"Uncaught N-API callback exception detected, please run node "
153+"Uncaught Node-API callback exception detected, please run node "
154154"with option --force-node-api-uncaught-exceptions-policy=true "
155155"to handle those exceptions properly.",
156156"DEP0168");
@@ -695,8 +695,8 @@ class AsyncContext {
695695} // end of namespace v8impl
696696697697// Intercepts the Node-V8 module registration callback. Converts parameters
698-// to NAPI equivalents and then calls the registration callback specified
699-// by the NAPI module.
698+// to Node-API equivalents and then calls the registration callback specified
699+// by the Node-API module.
700700static void napi_module_register_cb(v8::Local<v8::Object> exports,
701701 v8::Local<v8::Value> module,
702702 v8::Local<v8::Context> context,
@@ -816,7 +816,7 @@ node_module napi_module_to_node_module(const napi_module* mod) {
816816}
817817} // namespace node
818818819-// Registers a NAPI module.
819+// Registers a Node-API module.
820820void NAPI_CDECL napi_module_register(napi_module* mod) {
821821 node::node_module* nm =
822822new node::node_module(node::napi_module_to_node_module(mod));
@@ -859,7 +859,7 @@ struct napi_async_cleanup_hook_handle__ {
859859if (done_cb_ != nullptr) done_cb_(done_data_);
860860861861// Release the `env` handle asynchronously since it would be surprising if
862-// a call to a N-API function would destroy `env` synchronously.
862+// a call to a Node-API function would destroy `env` synchronously.
863863static_cast<node_napi_env>(env_)->node_env()->SetImmediate(
864864 [env = env_](node::Environment*) { env->Unref(); });
865865 }