From 620e46c8b59b6269784ebba42b23f23897eeedb9 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 17 Jul 2018 02:50:07 +0200 Subject: src: refactor default trace writer out of agent The agent code is supposed to manage multiple writers/clients. Adding the default writer into the mix breaks that encapsulation. Instead, manage default options through a separate "virtual" default client handle, and keep the file writer management all to the actual users. PR-URL: https://github.com/nodejs/node/pull/21867 Reviewed-By: James M Snell Reviewed-By: Eugene Ostroukhov Reviewed-By: Ali Ijaz Sheikh --- src/env.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/env.h') diff --git a/src/env.h b/src/env.h index 29f84a4af1..91ae782428 100644 --- a/src/env.h +++ b/src/env.h @@ -55,7 +55,7 @@ class performance_state; } namespace tracing { -class Agent; +class AgentWriterHandle; } namespace worker { @@ -587,7 +587,7 @@ class Environment { Environment(IsolateData* isolate_data, v8::Local context, - tracing::Agent* tracing_agent); + tracing::AgentWriterHandle* tracing_agent_writer); ~Environment(); void Start(int argc, @@ -625,7 +625,7 @@ class Environment { inline bool profiler_idle_notifier_started() const; inline v8::Isolate* isolate() const; - inline tracing::Agent* tracing_agent() const; + inline tracing::AgentWriterHandle* tracing_agent_writer() const; inline uv_loop_t* event_loop() const; inline uint32_t watched_providers() const; @@ -879,7 +879,7 @@ class Environment { v8::Isolate* const isolate_; IsolateData* const isolate_data_; - tracing::Agent* const tracing_agent_; + tracing::AgentWriterHandle* const tracing_agent_writer_; uv_timer_t timer_handle_; uv_check_t immediate_check_handle_; uv_idle_t immediate_idle_handle_; -- cgit v1.2.3