Commit 2218a0f9 authored by Xi Cheng's avatar Xi Cheng Committed by Commit Bot

Call ScheduleShutdownIfIdle() from FinishCollection()

This Cl also corrects the indent in FinishCollection().

Bug: 851163
Change-Id: I77b255b2f9191979bca02f5453d54fc8bd1e36ee
Reviewed-on: https://chromium-review.googlesource.com/1101406Reviewed-by: default avatarMike Wittman <wittman@chromium.org>
Commit-Queue: Xi Cheng <chengx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567403}
parent 7c777876
...@@ -506,6 +506,8 @@ void StackSamplingProfiler::SamplingThread::FinishCollection( ...@@ -506,6 +506,8 @@ void StackSamplingProfiler::SamplingThread::FinishCollection(
// Signal that this collection is finished. // Signal that this collection is finished.
finished->Signal(); finished->Signal();
ScheduleShutdownIfIdle();
} }
void StackSamplingProfiler::SamplingThread::ScheduleShutdownIfIdle() { void StackSamplingProfiler::SamplingThread::ScheduleShutdownIfIdle() {
...@@ -567,7 +569,6 @@ void StackSamplingProfiler::SamplingThread::RemoveCollectionTask( ...@@ -567,7 +569,6 @@ void StackSamplingProfiler::SamplingThread::RemoveCollectionTask(
DCHECK_EQ(1U, count); DCHECK_EQ(1U, count);
FinishCollection(collection.get()); FinishCollection(collection.get());
ScheduleShutdownIfIdle();
} }
void StackSamplingProfiler::SamplingThread::RecordSampleTask( void StackSamplingProfiler::SamplingThread::RecordSampleTask(
...@@ -621,7 +622,6 @@ void StackSamplingProfiler::SamplingThread::RecordSampleTask( ...@@ -621,7 +622,6 @@ void StackSamplingProfiler::SamplingThread::RecordSampleTask(
// All capturing has completed so finish the collection. // All capturing has completed so finish the collection.
FinishCollection(collection); FinishCollection(collection);
ScheduleShutdownIfIdle();
} }
void StackSamplingProfiler::SamplingThread::ShutdownTask(int add_events) { void StackSamplingProfiler::SamplingThread::ShutdownTask(int add_events) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment