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

Unified Diff: third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp

Issue 2741663004: MediaStreamSource: verify unlocked state when finalizing. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp
diff --git a/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp
index 98a314d3c753aad2b98759a2142bc525fd8e9caf..c65890142bb5e89ae772586390be824b963dc1c5 100644
--- a/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp
+++ b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp
@@ -55,6 +55,13 @@ MediaStreamSource::MediaStreamSource(const String& id,
m_readyState(readyState),
m_requiresConsumer(requiresConsumer) {}
+MediaStreamSource::~MediaStreamSource() {
+ // Verify that the audio thread isn't consuming audio.
+ // TODO(sof): remove once crbug.com/682945 has been diagnosed.
+ MutexTryLocker tryLocker(m_audioConsumersLock);
+ CHECK(tryLocker.locked());
+}
+
void MediaStreamSource::setReadyState(ReadyState readyState) {
if (m_readyState != ReadyStateEnded && m_readyState != readyState) {
m_readyState = readyState;
« no previous file with comments | « third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698