src: deprecate AddPromiseHook()
This API was added to fill an use case that is served by `async_hooks`, since that has `Promise` support. Deprecate this, as the underlying `Isolate::SetPromiseHook()` may be removed in its current form in the future. Refs: https://docs.google.com/document/d/1g8OrG5lMIUhRn1zbkutgY83MiTSMx-0NHDs8Bf-nXxM/ PR-URL: https://github.com/nodejs/node/pull/26529 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
2176d63055
commit
171b2707d3
@ -597,9 +597,10 @@ struct async_context {
|
|||||||
|
|
||||||
/* Registers an additional v8::PromiseHook wrapper. This API exists because V8
|
/* Registers an additional v8::PromiseHook wrapper. This API exists because V8
|
||||||
* itself supports only a single PromiseHook. */
|
* itself supports only a single PromiseHook. */
|
||||||
NODE_EXTERN void AddPromiseHook(v8::Isolate* isolate,
|
NODE_DEPRECATED("Use async_hooks directly instead",
|
||||||
promise_hook_func fn,
|
NODE_EXTERN void AddPromiseHook(v8::Isolate* isolate,
|
||||||
void* arg);
|
promise_hook_func fn,
|
||||||
|
void* arg));
|
||||||
|
|
||||||
/* This is a lot like node::AtExit, except that the hooks added via this
|
/* 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
|
* function are run before the AtExit ones and will always be registered
|
||||||
|
Loading…
x
Reference in New Issue
Block a user