mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: check GetAgent as GetTracingController() crashes if no agent is set
This commit is contained in:
committed by
deepak1556
parent
b1e69e1357
commit
5798b152a6
@@ -45,6 +45,7 @@ namespace tracing {
|
||||
class TraceEventHelper {
|
||||
public:
|
||||
static v8::TracingController* GetTracingController();
|
||||
static node::tracing::Agent* GetAgent();
|
||||
static void SetAgent(node::tracing::Agent* agent);
|
||||
};
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ void AtomRendererClient::DidCreateScriptContext(
|
||||
}
|
||||
|
||||
// Setup node tracing controller.
|
||||
if (!node::tracing::TraceEventHelper::GetTracingController())
|
||||
if (!node::tracing::TraceEventHelper::GetAgent())
|
||||
node::tracing::TraceEventHelper::SetAgent(node::CreateAgent());
|
||||
|
||||
// Setup node environment for each window.
|
||||
|
||||
Reference in New Issue
Block a user