File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -259,9 +259,18 @@ AsyncWrap::AsyncWrap(Environment* env,
259259 CHECK_NE (provider, PROVIDER_NONE);
260260 CHECK_GE (object->InternalFieldCount (), 1 );
261261
262+ switch (provider_type ()) {
263+ #define V (PROVIDER ) \
264+ case PROVIDER_ ## PROVIDER: \
265+ TRACE_EVENT_NESTABLE_ASYNC_BEGIN0 (" node" , #PROVIDER, get_uid ()); \
266+ break ;
267+ NODE_ASYNC_PROVIDER_TYPES (V)
268+ #undef V
269+ }
262270 // Shift provider value over to prevent id collision.
263271 persistent ().SetWrapperClassId (NODE_ASYNC_ID_OFFSET + provider);
264272
273+
265274 Local<Function> init_fn = env->async_hooks_init_function ();
266275
267276 // No init callback exists, no reason to go on.
@@ -303,6 +312,14 @@ AsyncWrap::AsyncWrap(Environment* env,
303312
304313
305314AsyncWrap::~AsyncWrap () {
315+ switch (provider_type ()) {
316+ #define V (PROVIDER ) \
317+ case PROVIDER_ ## PROVIDER: \
318+ TRACE_EVENT_NESTABLE_ASYNC_END0 (" node" , #PROVIDER, get_uid ()); \
319+ break ;
320+ NODE_ASYNC_PROVIDER_TYPES (V)
321+ #undef V
322+ }
306323 if (!ran_init_callback ())
307324 return ;
308325
You can’t perform that action at this time.
0 commit comments