Skip to content

Commit

Permalink
fix: initialize tracing controller before starting platform (#14499)
Browse files Browse the repository at this point in the history
  • Loading branch information
nornagon authored and alexeykuzmin committed Sep 9, 2018
1 parent 7252692 commit 2e5fca6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions atom/browser/javascript_environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ bool JavascriptEnvironment::Initialize() {

// 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);
platform_ = node::CreatePlatform(
base::RecommendedMaxNumberOfThreadsInPool(3, 8, 0.1, 0), nullptr);
base::RecommendedMaxNumberOfThreadsInPool(3, 8, 0.1, 0),
tracing_controller);
v8::V8::InitializePlatform(platform_);
node::tracing::TraceEventHelper::SetTracingController(
new v8::TracingController());
gin::IsolateHolder::Initialize(
gin::IsolateHolder::kNonStrictMode, gin::IsolateHolder::kStableV8Extras,
gin::ArrayBufferAllocator::SharedInstance(),
Expand Down

0 comments on commit 2e5fca6

Please sign in to comment.