diff --git a/src/js_native_api.h b/src/js_native_api.h index 8177ace3acbb89..6b53a2c28de461 100644 --- a/src/js_native_api.h +++ b/src/js_native_api.h @@ -364,7 +364,7 @@ napi_create_reference(napi_env env, // Deletes a reference. The referenced value is released, and may // be GC'd unless there are other references to it. -NAPI_EXTERN napi_status NAPI_CDECL napi_delete_reference(napi_env env, +NAPI_EXTERN napi_status NAPI_CDECL napi_delete_reference(node_api_basic_env env, napi_ref ref); // Increments the reference count, optionally returning the resulting count. diff --git a/src/js_native_api_v8.cc b/src/js_native_api_v8.cc index 260a572ce71a82..6dfcd534799b39 100644 --- a/src/js_native_api_v8.cc +++ b/src/js_native_api_v8.cc @@ -2773,7 +2773,8 @@ napi_status NAPI_CDECL napi_create_reference(napi_env env, // there are other references to it. // For a napi_reference returned from `napi_wrap`, this must be called in the // finalizer. -napi_status NAPI_CDECL napi_delete_reference(napi_env env, napi_ref ref) { +napi_status NAPI_CDECL napi_delete_reference(node_api_basic_env env, + napi_ref ref) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. CHECK_ENV(env);