diff options
author | Matteo Collina <hello@matteocollina.com> | 2018-05-04 09:00:07 +0300 |
---|---|---|
committer | Shelley Vohr <shelley.vohr@gmail.com> | 2020-02-17 23:38:51 +0300 |
commit | 6be51296e4e2a977c2c825719912bef1aa5b5bfc (patch) | |
tree | b505d22440fe283a8e7e1fddf8e1a600d4521ffd /src/env.h | |
parent | ba9fae058abd273934bf759ca4c89e060519c691 (diff) |
async_hooks: add executionAsyncResource
Remove the need for the destroy hook in the basic APM case.
Co-authored-by: Stephen Belanger <admin@stephenbelanger.com>
PR-URL: https://github.com/nodejs/node/pull/30959
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/env.h')
-rw-r--r-- | src/env.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/env.h b/src/env.h index 79f1665f2a9..3fe02b5b668 100644 --- a/src/env.h +++ b/src/env.h @@ -655,14 +655,16 @@ class AsyncHooks : public MemoryRetainer { inline AliasedUint32Array& fields(); inline AliasedFloat64Array& async_id_fields(); inline AliasedFloat64Array& async_ids_stack(); + inline v8::Local<v8::Array> execution_async_resources(); inline v8::Local<v8::String> provider_string(int idx); inline void no_force_checks(); inline Environment* env(); - inline void push_async_ids(double async_id, double trigger_async_id); - inline bool pop_async_id(double async_id); + inline void push_async_context(double async_id, double trigger_async_id, + v8::Local<v8::Value> execution_async_resource_); + inline bool pop_async_context(double async_id); inline void clear_async_id_stack(); // Used in fatal exceptions. AsyncHooks(const AsyncHooks&) = delete; @@ -707,6 +709,8 @@ class AsyncHooks : public MemoryRetainer { AliasedFloat64Array async_id_fields_; void grow_async_ids_stack(); + + v8::Global<v8::Array> execution_async_resources_; }; class ImmediateInfo : public MemoryRetainer { |