Skip to content

Commit

Permalink
chore: SetTracingController becomes SetAgent and corresponing contruc…
Browse files Browse the repository at this point in the history
…tions updated
  • Loading branch information
MarshallOfSound authored and deepak1556 committed Dec 3, 2018
1 parent f7f09b0 commit 9c36576
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions atom/browser/javascript_environment.cc
Expand Up @@ -46,8 +46,9 @@ v8::Isolate* JavascriptEnvironment::Initialize(uv_loop_t* event_loop) {

// The V8Platform of gin relies on Chromium's task schedule, which has not
// been started at this point, so we have to rely on Node's V8Platform.
auto* tracing_controller = new v8::TracingController();
node::tracing::TraceEventHelper::SetTracingController(tracing_controller);
auto* tracing_agent = node::CreateAgent();
auto* tracing_controller = tracing_agent->GetTracingController();
node::tracing::TraceEventHelper::SetAgent(tracing_agent);
platform_ = node::CreatePlatform(
base::RecommendedMaxNumberOfThreadsInPool(3, 8, 0.1, 0),
tracing_controller);
Expand Down
2 changes: 1 addition & 1 deletion atom/common/node_includes.h
Expand Up @@ -45,7 +45,7 @@ namespace tracing {
class TraceEventHelper {
public:
static v8::TracingController* GetTracingController();
static void SetTracingController(v8::TracingController* controller);
static void SetAgent(node::tracing::Agent* agent);
};

} // namespace tracing
Expand Down
3 changes: 1 addition & 2 deletions atom/renderer/atom_renderer_client.cc
Expand Up @@ -108,8 +108,7 @@ void AtomRendererClient::DidCreateScriptContext(

// Setup node tracing controller.
if (!node::tracing::TraceEventHelper::GetTracingController())
node::tracing::TraceEventHelper::SetTracingController(
new v8::TracingController());
node::tracing::TraceEventHelper::SetAgent(node::CreateAgent());

// Setup node environment for each window.
node::Environment* env = node_bindings_->CreateEnvironment(context);
Expand Down

0 comments on commit 9c36576

Please sign in to comment.