summaryrefslogtreecommitdiff
path: root/src/env.h
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-02-10 18:39:45 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2019-02-21 10:47:28 +0800
commitc435f069ebb3b8a1c6fb0d983db7f1b799715627 (patch)
treeb133acb7f191d15e9ef46531220b389938ea2a8c /src/env.h
parent435eea6400522189c9e521bde32134b03791a576 (diff)
downloadandroid-node-v8-c435f069ebb3b8a1c6fb0d983db7f1b799715627.tar.gz
android-node-v8-c435f069ebb3b8a1c6fb0d983db7f1b799715627.tar.bz2
android-node-v8-c435f069ebb3b8a1c6fb0d983db7f1b799715627.zip
process: simplify the setup of async hooks trace events
- Remove `trace_category_state` from `Environment` - since this is only accessed in the bootstrap process and later in the trace category update handler, we could just pass the initial values into JS land via the trace_events binding, and pass the dynamic values directly to the handler later, instead of accessing them out-of-band via the AliasedBuffer. - Instead of creating the hooks directly in `trace_events_async_hooks.js`, export the hook factory and create the hooks in trace category state toggle. PR-URL: https://github.com/nodejs/node/pull/26062 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/env.h')
-rw-r--r--src/env.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/env.h b/src/env.h
index d765c7bf52..5f578dd54a 100644
--- a/src/env.h
+++ b/src/env.h
@@ -707,7 +707,6 @@ class Environment {
inline AliasedBuffer<uint32_t, v8::Uint32Array>&
should_abort_on_uncaught_toggle();
- inline AliasedBuffer<uint8_t, v8::Uint8Array>& trace_category_state();
inline AliasedBuffer<int32_t, v8::Int32Array>& stream_base_state();
// The necessary API for async_hooks.
@@ -1022,8 +1021,6 @@ class Environment {
AliasedBuffer<uint32_t, v8::Uint32Array> should_abort_on_uncaught_toggle_;
int should_not_abort_scope_counter_ = 0;
- // Attached to a Uint8Array that tracks the state of trace category
- AliasedBuffer<uint8_t, v8::Uint8Array> trace_category_state_;
std::unique_ptr<TrackingTraceStateObserver> trace_state_observer_;
AliasedBuffer<int32_t, v8::Int32Array> stream_base_state_;