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

Unified Diff: src/cpu-profiler.cc

Issue 1658005: Make StopProfiling resilient to calls in unusual moments. (Closed)
Patch Set: Created 10 years, 8 months 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 | « no previous file | no next file » | 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 b8bff262f4289ff6d698ae00dd91c22b96dbeed4..d1230340e694c374a78642a489bb0216769e4238 100644
--- a/src/cpu-profiler.cc
+++ b/src/cpu-profiler.cc
@@ -253,14 +253,12 @@ void CpuProfiler::StartProfiling(String* title) {
CpuProfile* CpuProfiler::StopProfiling(const char* title) {
- ASSERT(singleton_ != NULL);
- return singleton_->StopCollectingProfile(title);
+ return singleton_ != NULL ? singleton_->StopCollectingProfile(title) : NULL;
}
CpuProfile* CpuProfiler::StopProfiling(String* title) {
- ASSERT(singleton_ != NULL);
- return singleton_->StopCollectingProfile(title);
+ return singleton_ != NULL ? singleton_->StopCollectingProfile(title) : NULL;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698