summaryrefslogtreecommitdiff
path: root/src/async_wrap.h
diff options
context:
space:
mode:
authorStephen Belanger <admin@stephenbelanger.com>2020-04-16 15:23:57 -0700
committerAnna Henningsen <anna@addaleax.net>2020-05-09 07:52:22 +0200
commit13c5a1629cd025ba560f34f6d3190b2f38d184d4 (patch)
tree69b199545b85d7d9d71fb7500e281a3e5ef88e33 /src/async_wrap.h
parent023bcdeb2848186192d2d3cd7ac33ff911b9a9ce (diff)
downloadnode-new-13c5a1629cd025ba560f34f6d3190b2f38d184d4.tar.gz
async_hooks: move PromiseHook handler to JS
This avoids the need to wrap every promise in an AsyncWrap and also makes it easier to skip the machinery to track destroy events when there's no destroy listener. Co-authored-by: Andrey Pechkurov <apechkurov@gmail.com> PR-URL: https://github.com/nodejs/node/pull/32891 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Diffstat (limited to 'src/async_wrap.h')
-rw-r--r--src/async_wrap.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/async_wrap.h b/src/async_wrap.h
index 34e84fde6d..dac86d694a 100644
--- a/src/async_wrap.h
+++ b/src/async_wrap.h
@@ -209,6 +209,11 @@ class AsyncWrap : public BaseObject {
ProviderType provider,
double execution_async_id,
bool silent);
+ AsyncWrap(Environment* env,
+ v8::Local<v8::Object> promise,
+ ProviderType provider,
+ double execution_async_id,
+ double trigger_async_id);
ProviderType provider_type_ = PROVIDER_NONE;
bool init_hook_ran_ = false;
// Because the values may be Reset(), cannot be made const.