Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a450ebfaf60acf22583f90cddc23e407578f40cd
      
https://github.com/WebKit/WebKit/commit/a450ebfaf60acf22583f90cddc23e407578f40cd
  Author: Youenn Fablet <[email protected]>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M Source/WebCore/platform/mediastream/cocoa/BaseAudioCaptureUnit.cpp

  Log Message:
  -----------
  REGRESSION(316360@main):[macOS] 
fast/mediastream/microphone-interruption-and-audio-session.html is a constant 
TEXT failure
rdar://181852376
https://bugs.webkit.org/show_bug.cgi?id=319003

Reviewed by Jer Noble.

Like we are exiting early in BaseAudioCaptureUnit::resume if not suspended,we 
also exit early in BaseAudioCaptureUnit::suspend if already suspended.
This ensures that we would not reset the canResumeAdterInterruption flag back 
to false in case of two suspends
This is a speculative fix as I was not able to reproduce.

As a fly-by fix, we no longer set m_producingCount to 0 in 
suspend/captureFailed since m_producingCount is also updated asynchronously in 
BaseAudioCaptureUnit::stopProducingData, and this can trigger a DEBUG assert in 
BaseAudioCaptureUnit::stopProducingData. This was sometimes triggered when 
running LayoutTests/fast/mediastream/microphone-change-while-muted.html, which 
runs just before 
LayoutTests/fast/mediastream/microphone-interruption-and-audio-session.html.

* Source/WebCore/platform/mediastream/cocoa/BaseAudioCaptureUnit.cpp:
(WebCore::BaseAudioCaptureUnit::captureFailed):
(WebCore::BaseAudioCaptureUnit::resume):
(WebCore::BaseAudioCaptureUnit::suspend):
* Source/WebCore/platform/mediastream/cocoa/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSource::stopProducingData):
* Source/WebCore/platform/mediastream/cocoa/CoreAudioCaptureSource.h:
(WebCore::CoreAudioCaptureSource::setCanResumeAfterInterruption):

Canonical link: https://commits.webkit.org/317299@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to