diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-10-20 12:02:37 +0300 |
---|---|---|
committer | Matheus Marchini <mat@mmarchini.me> | 2018-10-24 17:18:47 +0300 |
commit | 036fbdb63d603a64bd8562ec9331dfb7a5c5075c (patch) | |
tree | 074fd39f0951479bb0daac154c4a9e291b917804 /src/inspector | |
parent | d568b53931958075be962ce79d23c24307af66f5 (diff) |
src: remove `Environment::tracing_agent_writer()`
As per the conversation in https://github.com/nodejs/node/issues/22513,
this is essentially global, and adding this on the Environment
is generally just confusing.
Refs: https://github.com/nodejs/node/issues/22513
Fixes: https://github.com/nodejs/node/issues/22767
PR-URL: https://github.com/nodejs/node/pull/23781
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Diffstat (limited to 'src/inspector')
-rw-r--r-- | src/inspector/tracing_agent.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/inspector/tracing_agent.cc b/src/inspector/tracing_agent.cc index fe69e6f863e..1ad67d9b9e7 100644 --- a/src/inspector/tracing_agent.cc +++ b/src/inspector/tracing_agent.cc @@ -1,4 +1,5 @@ #include "tracing_agent.h" +#include "node_internals.h" #include "env-inl.h" #include "v8.h" @@ -74,9 +75,9 @@ DispatchResponse TracingAgent::start( if (categories_set.empty()) return DispatchResponse::Error("At least one category should be enabled"); - auto* writer = env_->tracing_agent_writer(); + tracing::AgentWriterHandle* writer = GetTracingAgentWriter(); if (writer != nullptr) { - trace_writer_ = env_->tracing_agent_writer()->agent()->AddClient( + trace_writer_ = writer->agent()->AddClient( categories_set, std::unique_ptr<InspectorTraceWriter>( new InspectorTraceWriter(frontend_.get())), |