Chromium Code Reviews| Index: base/trace_event/trace_event_synthetic_delay.cc |
| diff --git a/base/trace_event/trace_event_synthetic_delay.cc b/base/trace_event/trace_event_synthetic_delay.cc |
| index cfae7435e9ba9ff30b98ca268520bdaf8aab681b..5f0cfbb1b08c7b4c0b99481d6b153bb916fe2cd8 100644 |
| --- a/base/trace_event/trace_event_synthetic_delay.cc |
| +++ b/base/trace_event/trace_event_synthetic_delay.cc |
| @@ -76,12 +76,6 @@ void TraceEventSyntheticDelay::SetClock(TraceEventSyntheticDelayClock* clock) { |
| } |
| void TraceEventSyntheticDelay::Begin() { |
| - // Note that we check for a non-zero target duration without locking to keep |
| - // things quick for the common case when delays are disabled. Since the delay |
| - // calculation is done with a lock held, it will always be correct. The only |
| - // downside of this is that we may fail to apply some delays when the target |
| - // duration changes. |
| - ANNOTATE_BENIGN_RACE(&target_duration_, "Synthetic delay duration"); |
|
Sami
2017/03/21 11:52:55
There is actually a race here (SetTargetDuration w
|
| if (!target_duration_.ToInternalValue()) |
| return; |
| @@ -95,8 +89,6 @@ void TraceEventSyntheticDelay::Begin() { |
| } |
| void TraceEventSyntheticDelay::BeginParallel(TimeTicks* out_end_time) { |
| - // See note in Begin(). |
| - ANNOTATE_BENIGN_RACE(&target_duration_, "Synthetic delay duration"); |
| if (!target_duration_.ToInternalValue()) { |
| *out_end_time = TimeTicks(); |
| return; |
| @@ -110,8 +102,6 @@ void TraceEventSyntheticDelay::BeginParallel(TimeTicks* out_end_time) { |
| } |
| void TraceEventSyntheticDelay::End() { |
| - // See note in Begin(). |
| - ANNOTATE_BENIGN_RACE(&target_duration_, "Synthetic delay duration"); |
| if (!target_duration_.ToInternalValue()) |
| return; |