Fix race in CpuProfiler::StopProcessor / CpuProfiler::TickSampleEvent.

R=mstarzinger@chromium.org
BUG=v8:1700
TEST=inspector/profiler/cpu-profiler-profiling-without-inspector.html

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b5946d78
...@@ -551,12 +551,12 @@ void CpuProfiler::StopProcessor() { ...@@ -551,12 +551,12 @@ void CpuProfiler::StopProcessor() {
sampler->Stop(); sampler->Stop();
need_to_stop_sampler_ = false; need_to_stop_sampler_ = false;
} }
NoBarrier_Store(&is_profiling_, false);
processor_->Stop(); processor_->Stop();
processor_->Join(); processor_->Join();
delete processor_; delete processor_;
delete generator_; delete generator_;
processor_ = NULL; processor_ = NULL;
NoBarrier_Store(&is_profiling_, false);
generator_ = NULL; generator_ = NULL;
logger->logging_nesting_ = saved_logging_nesting_; logger->logging_nesting_ = saved_logging_nesting_;
} }
......
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