From 8364375347246d762507b4163d18a25a9c627dac Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 19 Oct 2021 15:04:48 +0200 Subject: [PATCH] fix: ensure TracingAgent in place for SWs (#31459) --- shell/renderer/web_worker_observer.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/renderer/web_worker_observer.cc b/shell/renderer/web_worker_observer.cc index e2ae116cdd7f..2faec5ffc434 100644 --- a/shell/renderer/web_worker_observer.cc +++ b/shell/renderer/web_worker_observer.cc @@ -51,6 +51,10 @@ void WebWorkerObserver::WorkerScriptReadyForEvaluation( // Start the embed thread. node_bindings_->PrepareMessageLoop(); + // Setup node tracing controller. + if (!node::tracing::TraceEventHelper::GetAgent()) + node::tracing::TraceEventHelper::SetAgent(node::CreateAgent()); + // Setup node environment for each window. bool initialized = node::InitializeContext(worker_context); CHECK(initialized);