Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: src/cpu-profiler.cc

Issue 103893003: Do not stop profiling if all finished profiles were deleted (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments addressed Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cpu-profiler.cc
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc
index b1af621cccc1a3425e87534faafa8b14cea77c7f..ef39341ef0c789570eb9b8f05c896ce91e6f226e 100644
--- a/src/cpu-profiler.cc
+++ b/src/cpu-profiler.cc
@@ -176,6 +176,10 @@ void CpuProfiler::DeleteAllProfiles() {
void CpuProfiler::DeleteProfile(CpuProfile* profile) {
profiles_->RemoveProfile(profile);
delete profile;
+ if (profiles_->profiles()->is_empty() && !is_profiling_) {
+ // If this was the last profile, clean up all accessory data as well.
+ ResetProfiles();
+ }
}
« no previous file with comments | « src/api.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698