diff --git a/src/node.h b/src/node.h index 3ba5cf92f349d2..d84d26e6296313 100644 --- a/src/node.h +++ b/src/node.h @@ -585,9 +585,10 @@ struct async_context { /* Registers an additional v8::PromiseHook wrapper. This API exists because V8 * itself supports only a single PromiseHook. */ -NODE_EXTERN void AddPromiseHook(v8::Isolate* isolate, - promise_hook_func fn, - void* arg); +NODE_DEPRECATED("Use async_hooks directly instead", + NODE_EXTERN void AddPromiseHook(v8::Isolate* isolate, + promise_hook_func fn, + void* arg)); /* This is a lot like node::AtExit, except that the hooks added via this * function are run before the AtExit ones and will always be registered