Make StopProfiling resilient to calls in unusual moments.

Review URL: http://codereview.chromium.org/1658005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ab6394b2
...@@ -253,14 +253,12 @@ void CpuProfiler::StartProfiling(String* title) { ...@@ -253,14 +253,12 @@ void CpuProfiler::StartProfiling(String* title) {
CpuProfile* CpuProfiler::StopProfiling(const char* title) { CpuProfile* CpuProfiler::StopProfiling(const char* title) {
ASSERT(singleton_ != NULL); return singleton_ != NULL ? singleton_->StopCollectingProfile(title) : NULL;
return singleton_->StopCollectingProfile(title);
} }
CpuProfile* CpuProfiler::StopProfiling(String* title) { CpuProfile* CpuProfiler::StopProfiling(String* title) {
ASSERT(singleton_ != NULL); return singleton_ != NULL ? singleton_->StopCollectingProfile(title) : NULL;
return singleton_->StopCollectingProfile(title);
} }
......
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