summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authormiu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-16 11:40:36 +0000
committermiu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-16 11:40:36 +0000
commitf3ef24cc14923287ccdd8467402b8a2d1df7ab60 (patch)
treea309db4556657abc11078def831a6a534b90b1c4 /media
parent1dd0dd59d10876a6e34f122b6e93c201141745db (diff)
downloadchromium_src-f3ef24cc14923287ccdd8467402b8a2d1df7ab60.zip
chromium_src-f3ef24cc14923287ccdd8467402b8a2d1df7ab60.tar.gz
chromium_src-f3ef24cc14923287ccdd8467402b8a2d1df7ab60.tar.bz2
Fix TSAN-detected data race: Sync with audio thread before accessing output_streams_ in unit test code. Removed suppression.
BUG=170245 TEST=Ran TSAN analyzer tool before and after fix. Confirmed several runs all succeed. Review URL: https://chromiumcodereview.appspot.com/11962008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177133 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/audio/virtual_audio_input_stream_unittest.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/media/audio/virtual_audio_input_stream_unittest.cc b/media/audio/virtual_audio_input_stream_unittest.cc
index 93b4b01..5a5be13 100644
--- a/media/audio/virtual_audio_input_stream_unittest.cc
+++ b/media/audio/virtual_audio_input_stream_unittest.cc
@@ -161,6 +161,9 @@ class VirtualAudioInputStreamTest
}
void WaitForDataPulls() {
+ // Wait until audio thread is idle before calling output_streams_.size().
+ SyncWithAudioThread();
+
const int count = output_streams_.size();
for (int i = 0; i < count; ++i) {
source_.WaitForDataPulls();