mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: Move ThreadProfiler initialization to the UI thread (fixes #3465)
ThreadProfiler::CreateAndStartOnMainThread and SetMainThreadTaskRunnerImpl should be called on the same thread.
This commit is contained in:
@@ -394,6 +394,7 @@ bool CefMainRunner::ContentMainRun(bool* initialized,
|
||||
|
||||
if (!CreateUIThread(base::BindOnce(
|
||||
[](CefMainRunner* runner, base::WaitableEvent* event) {
|
||||
runner->main_delegate_->BeforeUIThreadInitialize();
|
||||
content::ContentMainRun(runner->main_runner_.get());
|
||||
event->Signal();
|
||||
},
|
||||
@@ -408,6 +409,7 @@ bool CefMainRunner::ContentMainRun(bool* initialized,
|
||||
uithread_startup_event.Wait();
|
||||
} else {
|
||||
*initialized = true;
|
||||
main_delegate_->BeforeUIThreadInitialize();
|
||||
content::ContentMainRun(main_runner_.get());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user