Title: [215760] trunk/Source/WebCore
Revision
215760
Author
commit-qu...@webkit.org
Date
2017-04-25 14:21:05 -0700 (Tue, 25 Apr 2017)

Log Message

CoreAudioCaptureSource::suspend is asserting too often
https://bugs.webkit.org/show_bug.cgi?id=171285

Patch by Youenn Fablet <you...@apple.com> on 2017-04-25
Reviewed by Eric Carlson.

No change of behavior.

* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSource::suspend): Moving the assertion to where it might be useful.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (215759 => 215760)


--- trunk/Source/WebCore/ChangeLog	2017-04-25 21:15:16 UTC (rev 215759)
+++ trunk/Source/WebCore/ChangeLog	2017-04-25 21:21:05 UTC (rev 215760)
@@ -1,3 +1,15 @@
+2017-04-25  Youenn Fablet  <you...@apple.com>
+
+        CoreAudioCaptureSource::suspend is asserting too often
+        https://bugs.webkit.org/show_bug.cgi?id=171285
+
+        Reviewed by Eric Carlson.
+
+        No change of behavior.
+
+        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
+        (WebCore::CoreAudioCaptureSource::suspend): Moving the assertion to where it might be useful.
+
 2017-04-25  Daniel Bates  <daba...@apple.com>
 
         Use an OptionSet for compositing reasons bitmask

Modified: trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp (215759 => 215760)


--- trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp	2017-04-25 21:15:16 UTC (rev 215759)
+++ trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp	2017-04-25 21:21:05 UTC (rev 215760)
@@ -472,9 +472,9 @@
 OSStatus CoreAudioCaptureSource::suspend()
 {
     ASSERT(isMainThread());
-    ASSERT(m_ioUnit);
 
     if (m_ioUnitStarted) {
+        ASSERT(m_ioUnit);
         auto err = AudioOutputUnitStop(m_ioUnit);
         if (err) {
             LOG(Media, "CoreAudioCaptureSource::resume(%p) AudioOutputUnitStop failed with error %d (%.4s)", this, (int)err, (char*)&err);
@@ -484,6 +484,7 @@
     }
 
     if (m_ioUnitInitialized) {
+        ASSERT(m_ioUnit);
         auto err = AudioUnitUninitialize(m_ioUnit);
         if (err) {
             LOG(Media, "CoreAudioCaptureSource::resume(%p) AudioUnitUninitialize failed with error %d (%.4s)", this, (int)err, (char*)&err);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to