Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1677)

Unified Diff: media/audio/audio_power_monitor.cc

Issue 611373003: Add a mutex lock to AudioPowerMonitor::Reset() to placate TSAN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_power_monitor.cc
diff --git a/media/audio/audio_power_monitor.cc b/media/audio/audio_power_monitor.cc
index 6536f464b9c16905e7d4080a907b5a4df5678acf..8b7cbffd975c479887549575ab649e072a9b6c76 100644
--- a/media/audio/audio_power_monitor.cc
+++ b/media/audio/audio_power_monitor.cc
@@ -26,6 +26,7 @@ AudioPowerMonitor::~AudioPowerMonitor() {
}
void AudioPowerMonitor::Reset() {
+ base::AutoLock for_reset(reading_lock_);
power_reading_ = average_power_ = 0.0f;
clipped_reading_ = has_clipped_ = false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698