refactor: use node::tracing::Agent() directly (35-x-y) (#45619)

* refactor: use node::tracing::Agent()

* chore: e patches all

---------

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
Charles Kerr 2025-02-14 04:02:19 -06:00 committed by GitHub
parent cd1186a116
commit b52917c380
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 14 additions and 55 deletions

View file

@ -92,8 +92,10 @@ void ElectronRendererClient::DidCreateScriptContext(
}
// Setup node tracing controller.
if (!node::tracing::TraceEventHelper::GetAgent())
node::tracing::TraceEventHelper::SetAgent(node::CreateAgent());
if (!node::tracing::TraceEventHelper::GetAgent()) {
auto* tracing_agent = new node::tracing::Agent();
node::tracing::TraceEventHelper::SetAgent(tracing_agent);
}
// Setup node environment for each window.
v8::Maybe<bool> initialized = node::InitializeContext(renderer_context);