diff --git a/src/env.cc b/src/env.cc index 73a8e6e773f58c..2e56d216aa203d 100644 --- a/src/env.cc +++ b/src/env.cc @@ -146,7 +146,7 @@ void InitThreadLocalOnce() { CHECK_EQ(0, uv_key_create(&Environment::thread_local_env)); } -void Environment::TrackingTraceStateObserver::UpdateTraceCategoryState() { +void TrackingTraceStateObserver::UpdateTraceCategoryState() { if (!env_->owns_process_state()) { // Ideally, we’d have a consistent story that treats all threads/Environment // instances equally here. However, tracing is essentially global, and this diff --git a/src/env.h b/src/env.h index 7ac325abbc77cc..fe925e0a57af7d 100644 --- a/src/env.h +++ b/src/env.h @@ -660,6 +660,25 @@ class TickInfo { AliasedBuffer fields_; }; +class TrackingTraceStateObserver : + public v8::TracingController::TraceStateObserver { + public: + explicit TrackingTraceStateObserver(Environment* env) : env_(env) {} + + void OnTraceEnabled() override { + UpdateTraceCategoryState(); + } + + void OnTraceDisabled() override { + UpdateTraceCategoryState(); + } + + private: + void UpdateTraceCategoryState(); + + Environment* env_; +}; + class Environment { public: Environment(const Environment&) = delete; @@ -979,25 +998,6 @@ class Environment { // This needs to be available for the JS-land setImmediate(). void ToggleImmediateRef(bool ref); - class TrackingTraceStateObserver : - public v8::TracingController::TraceStateObserver { - public: - explicit TrackingTraceStateObserver(Environment* env) : env_(env) {} - - void OnTraceEnabled() override { - UpdateTraceCategoryState(); - } - - void OnTraceDisabled() override { - UpdateTraceCategoryState(); - } - - private: - void UpdateTraceCategoryState(); - - Environment* env_; - }; - class ShouldNotAbortOnUncaughtScope { public: explicit inline ShouldNotAbortOnUncaughtScope(Environment* env);