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

Unified Diff: content/renderer/media/webrtc_audio_device_impl.h

Issue 1036993003: Fix the way locks are acquired in WebRtcAudioDeviceImpl::SetAudioRenderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Name variables in comments according to convention, extra header comment. Created 5 years, 9 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
Index: content/renderer/media/webrtc_audio_device_impl.h
diff --git a/content/renderer/media/webrtc_audio_device_impl.h b/content/renderer/media/webrtc_audio_device_impl.h
index e235320889ce909c7a273100fef3235e319731e4..0368a90d49636160c40c409ff37242052c1e5f65 100644
--- a/content/renderer/media/webrtc_audio_device_impl.h
+++ b/content/renderer/media/webrtc_audio_device_impl.h
@@ -167,7 +167,9 @@
// most methods are called on the same thread. However, some methods are
// also called on a Libjingle worker thread. RenderData is called on the
// AudioOutputDevice thread and CaptureData on the AudioInputDevice thread.
-// To summarize: this class lives on four different threads.
+// To summarize: this class lives on four different threads, so it is
+// important to be careful with the order in which locks are acquired in
+// order to avoid potential deadlocks.
// - The webrtc::AudioDeviceModule is reference counted.
// - AGC is only supported in combination with the WASAPI-based audio layer
// on Windows, i.e., it is not supported on Windows XP.

Powered by Google App Engine
This is Rietveld 408576698