From bc63112002a1ae0c9ca9fd0960871969d4fe0697 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 16 Jul 2019 14:45:29 -0700 Subject: [PATCH 1/2] src: expose TraceEventHelper with NODE_EXTERN As node requires a tracing controller to be initialized embedders need access to the TraceEventHelper so that we can actually set the tracing controller. Refs: https://github.com/electron/electron/commit/0e5b6f93000e4718c9e35332ddbd0f6b76cdd585/#diff-89b287b2edd0a02dddae60cb26157f47 --- src/tracing/trace_event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tracing/trace_event.h b/src/tracing/trace_event.h index 590cb592fc054f..4a398106d77e5e 100644 --- a/src/tracing/trace_event.h +++ b/src/tracing/trace_event.h @@ -310,7 +310,7 @@ const int kZeroNumArgs = 0; const decltype(nullptr) kGlobalScope = nullptr; const uint64_t kNoId = 0; -class TraceEventHelper { +class NODE_EXTERN TraceEventHelper { public: static TracingController* GetTracingController(); static Agent* GetAgent(); From ddd83f44c60d1351e0ec6fe2960db8179bd2e3e1 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 20 Jul 2019 21:55:17 -0700 Subject: [PATCH 2/2] fixup! src: expose TraceEventHelper with NODE_EXTERN --- src/tracing/trace_event.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tracing/trace_event.h b/src/tracing/trace_event.h index 4a398106d77e5e..27408eafd832ae 100644 --- a/src/tracing/trace_event.h +++ b/src/tracing/trace_event.h @@ -310,6 +310,8 @@ const int kZeroNumArgs = 0; const decltype(nullptr) kGlobalScope = nullptr; const uint64_t kNoId = 0; +// Extern (for now) because embedders need access to TraceEventHelper. +// Refs: https://github.com/nodejs/node/pull/28724 class NODE_EXTERN TraceEventHelper { public: static TracingController* GetTracingController();