summaryrefslogtreecommitdiff
path: root/libcef/common/chrome/chrome_main_runner_delegate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libcef/common/chrome/chrome_main_runner_delegate.cc')
-rw-r--r--libcef/common/chrome/chrome_main_runner_delegate.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcef/common/chrome/chrome_main_runner_delegate.cc b/libcef/common/chrome/chrome_main_runner_delegate.cc
index 70aba721..57a92d93 100644
--- a/libcef/common/chrome/chrome_main_runner_delegate.cc
+++ b/libcef/common/chrome/chrome_main_runner_delegate.cc
@@ -40,8 +40,6 @@ void ChromeMainRunnerDelegate::BeforeMainThreadInitialize(
#else
base::CommandLine::Init(args.argc, args.argv);
#endif
-
- sampling_profiler_ = std::make_unique<MainThreadStackSamplingProfiler>();
}
void ChromeMainRunnerDelegate::BeforeMainMessageLoopRun(
@@ -70,14 +68,16 @@ bool ChromeMainRunnerDelegate::HandleMainMessageLoopQuit() {
return true;
}
+void ChromeMainRunnerDelegate::BeforeUIThreadInitialize() {
+ sampling_profiler_ = std::make_unique<MainThreadStackSamplingProfiler>();
+}
+
void ChromeMainRunnerDelegate::AfterUIThreadShutdown() {
static_cast<ChromeContentBrowserClient*>(
CefAppManager::Get()->GetContentClient()->browser())
->CleanupOnUIThread();
main_delegate_->CleanupOnUIThread();
-}
-void ChromeMainRunnerDelegate::AfterMainThreadShutdown() {
sampling_profiler_.reset();
}