summaryrefslogtreecommitdiff
path: root/src/inspector/tracing_agent.h
diff options
context:
space:
mode:
authorEugene Ostroukhov <eostroukhov@google.com>2018-12-03 13:25:30 -0800
committerEugene Ostroukhov <eostroukhov@google.com>2019-01-30 11:48:42 -0800
commit80a18cac8bc5acaac0ece301cff21066d0464499 (patch)
tree0d93ba8f69d52fc8b671849a98cb8f9d5790b9b7 /src/inspector/tracing_agent.h
parentc64b1aef07dd1f036f1e940a2b104db63406cafc (diff)
downloadnode-new-80a18cac8bc5acaac0ece301cff21066d0464499.tar.gz
inspector, trace_events: make sure messages are sent on a main thread
Fixes: https://github.com/nodejs/node/issues/23185 PR-URL: https://github.com/nodejs/node/pull/24814 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/inspector/tracing_agent.h')
-rw-r--r--src/inspector/tracing_agent.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/inspector/tracing_agent.h b/src/inspector/tracing_agent.h
index 029fce7c19..29587b03c8 100644
--- a/src/inspector/tracing_agent.h
+++ b/src/inspector/tracing_agent.h
@@ -10,11 +10,13 @@ namespace node {
class Environment;
namespace inspector {
+class MainThreadHandle;
+
namespace protocol {
class TracingAgent : public NodeTracing::Backend {
public:
- explicit TracingAgent(Environment*);
+ explicit TracingAgent(Environment*, std::shared_ptr<MainThreadHandle>);
~TracingAgent() override;
void Wire(UberDispatcher* dispatcher);
@@ -29,8 +31,10 @@ class TracingAgent : public NodeTracing::Backend {
void DisconnectTraceClient();
Environment* env_;
+ std::shared_ptr<MainThreadHandle> main_thread_;
tracing::AgentWriterHandle trace_writer_;
- std::unique_ptr<NodeTracing::Frontend> frontend_;
+ int frontend_object_id_;
+ std::shared_ptr<NodeTracing::Frontend> frontend_;
};