diff options
author | James M Snell <jasnell@gmail.com> | 2018-07-29 23:16:45 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-08-17 19:08:05 +0300 |
commit | 4b7cd4bd60623b9c69d791112f4500575a3e9e7d (patch) | |
tree | af178bce561ac6c86289cca200460c35a5ebd230 /src/node_trace_events.cc | |
parent | 2ce03804a6a2e55a034814ca40fafac654321e33 (diff) |
trace_events: add trace category enabled tracking
Track state of async_hooks trace event category enablement.
Enable/disable the async_hooks trace event dynamically.
PR-URL: https://github.com/nodejs/node/pull/22128
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Diffstat (limited to 'src/node_trace_events.cc')
-rw-r--r-- | src/node_trace_events.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/node_trace_events.cc b/src/node_trace_events.cc index 219e142a319..6e70cfce7be 100644 --- a/src/node_trace_events.cc +++ b/src/node_trace_events.cc @@ -127,6 +127,10 @@ void Initialize(Local<Object> target, .FromJust(); target->Set(context, trace, binding->Get(context, trace).ToLocalChecked()).FromJust(); + + target->Set(context, + FIXED_ONE_BYTE_STRING(env->isolate(), "traceCategoryState"), + env->trace_category_state().GetJSArray()).FromJust(); } } // namespace node |