Revision: 4435
Author: [email protected]
Date: Fri Apr 16 01:44:17 2010
Log: Make StopProfiling resilient to calls in unusual moments.
Review URL: http://codereview.chromium.org/1658005
http://code.google.com/p/v8/source/detail?r=4435
Modified:
/branches/bleeding_edge/src/cpu-profiler.cc
=======================================
--- /branches/bleeding_edge/src/cpu-profiler.cc Thu Apr 15 04:37:29 2010
+++ /branches/bleeding_edge/src/cpu-profiler.cc Fri Apr 16 01:44:17 2010
@@ -253,14 +253,12 @@
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;
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev