fix: initialize tracing controller before starting platform (#14499)
This commit is contained in:
parent
7589555cec
commit
829b230b85
1 changed files with 4 additions and 3 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue