Index: src/cpu-profiler.cc |
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc |
index 42722191bd5a0cce0c9bdb7d8a909cbd3d30fb2a..109ddd5d976f0a36ccdb1512e02b2a78467238d6 100644 |
--- a/src/cpu-profiler.cc |
+++ b/src/cpu-profiler.cc |
@@ -191,9 +191,8 @@ void ProfilerEventsProcessor::AddCurrentStack() { |
bool ProfilerEventsProcessor::ProcessCodeEvent(unsigned* dequeue_order) { |
- if (!events_buffer_.IsEmpty()) { |
- CodeEventsContainer record; |
- events_buffer_.Dequeue(&record); |
+ CodeEventsContainer record; |
+ if (events_buffer_.Dequeue(&record)) { |
switch (record.generic.type) { |
#define PROFILER_TYPE_CASE(type, clss) \ |
case CodeEventRecord::type: \ |