diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-06-12 00:36:19 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-06-16 02:04:31 +0300 |
commit | b371213d3d2b499f0392af2103cf45262e1042d3 (patch) | |
tree | 4ecab834769e41ad870cc7658ee8cf891b778550 /src/node_platform.cc | |
parent | f645cc73185f1d690e82b01907e2c0da330a26de (diff) |
src: add public APIs to manage v8::TracingController
We added a hack for this a while ago for Electron, so let’s remove
that hack and make this an official API.
Refs: https://github.com/nodejs/node/pull/28724
Refs: https://github.com/nodejs/node/issues/33800
PR-URL: https://github.com/nodejs/node/pull/33850
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src/node_platform.cc')
-rw-r--r-- | src/node_platform.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_platform.cc b/src/node_platform.cc index c5ccf8a3b52..e2c5aa230d0 100644 --- a/src/node_platform.cc +++ b/src/node_platform.cc @@ -333,7 +333,8 @@ NodePlatform::NodePlatform(int thread_pool_size, // TODO(addaleax): It's a bit icky that we use global state here, but we can't // really do anything about it unless V8 starts exposing a way to access the // current v8::Platform instance. - tracing::TraceEventHelper::SetTracingController(tracing_controller_); + SetTracingController(tracing_controller_); + DCHECK_EQ(GetTracingController(), tracing_controller_); worker_thread_task_runner_ = std::make_shared<WorkerThreadsTaskRunner>(thread_pool_size); } |