summaryrefslogtreecommitdiff
path: root/src/env.h
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-07-17 02:50:07 +0200
committerAnna Henningsen <anna@addaleax.net>2018-08-01 17:16:51 +0200
commit620e46c8b59b6269784ebba42b23f23897eeedb9 (patch)
tree6b396fdec4964d0305bbbb62195ebf56e636c78e /src/env.h
parent3ac94dc977b232a4502307733af2b3af60e7b102 (diff)
downloadandroid-node-v8-620e46c8b59b6269784ebba42b23f23897eeedb9.tar.gz
android-node-v8-620e46c8b59b6269784ebba42b23f23897eeedb9.tar.bz2
android-node-v8-620e46c8b59b6269784ebba42b23f23897eeedb9.zip
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 <jasnell@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'src/env.h')
-rw-r--r--src/env.h8
1 files changed, 4 insertions, 4 deletions
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<v8::Context> 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_;