chore: check GetAgent as GetTracingController() crashes if no agent is set
This commit is contained in:
parent
b1e69e1357
commit
5798b152a6
2 changed files with 2 additions and 1 deletions
|
@ -45,6 +45,7 @@ namespace tracing {
|
||||||
class TraceEventHelper {
|
class TraceEventHelper {
|
||||||
public:
|
public:
|
||||||
static v8::TracingController* GetTracingController();
|
static v8::TracingController* GetTracingController();
|
||||||
|
static node::tracing::Agent* GetAgent();
|
||||||
static void SetAgent(node::tracing::Agent* agent);
|
static void SetAgent(node::tracing::Agent* agent);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ void AtomRendererClient::DidCreateScriptContext(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup node tracing controller.
|
// Setup node tracing controller.
|
||||||
if (!node::tracing::TraceEventHelper::GetTracingController())
|
if (!node::tracing::TraceEventHelper::GetAgent())
|
||||||
node::tracing::TraceEventHelper::SetAgent(node::CreateAgent());
|
node::tracing::TraceEventHelper::SetAgent(node::CreateAgent());
|
||||||
|
|
||||||
// Setup node environment for each window.
|
// Setup node environment for each window.
|
||||||
|
|
Loading…
Add table
Reference in a new issue