Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 960cc2745175abf2a027af86de66673a8f35ac55
      
https://github.com/WebKit/WebKit/commit/960cc2745175abf2a027af86de66673a8f35ac55
  Author: Eric Carlson <[email protected]>
  Date:   2026-04-29 (Wed, 29 Apr 2026)

  Changed paths:
    M Source/WebCore/platform/mediastream/cocoa/AVVideoCaptureSource.h
    M Source/WebCore/platform/mediastream/cocoa/AVVideoCaptureSource.mm

  Log Message:
  -----------
  [Cocoa] Exception thrown by -[AVCapturePhotoOutput setMaxPhotoDimensions:]
https://bugs.webkit.org/show_bug.cgi?id=311754
rdar://170593863

Reviewed by Youenn Fablet.

Catch exceptions thrown while using AVCapture objects while taking a photo. We 
were
unintentionally using the AVCapture device on both the main thread and the 
photo capture
queue, so restructure the code to not do that and add WTF_GUARDED_BY_CAPABILITY
annotations to the non-POD ivars to ensure they are used correctly.

* Source/WebCore/platform/mediastream/cocoa/AVVideoCaptureSource.h:
(WebCore::AVVideoCaptureSource::session const): Deleted.
(WebCore::AVVideoCaptureSource::device const): Deleted.
* Source/WebCore/platform/mediastream/cocoa/AVVideoCaptureSource.mm:
(WebCore::maxPhotoSizeForFormat):
(WebCore::AVVideoCaptureSource::~AVVideoCaptureSource):
(WebCore::AVVideoCaptureSource::clearSession):
(WebCore::AVVideoCaptureSource::startProducingData):
(WebCore::AVVideoCaptureSource::stopProducingData):
(WebCore::AVVideoCaptureSource::stopSession):
(WebCore::AVVideoCaptureSource::beginConfiguration):
(WebCore::AVVideoCaptureSource::commitConfiguration):
(WebCore::AVVideoCaptureSource::settingsDidChange):
(WebCore::AVVideoCaptureSource::configurationChanged):
(WebCore::AVVideoCaptureSource::settings):
(WebCore::AVVideoCaptureSource::capabilities):
(WebCore::AVVideoCaptureSource::device const):
(WebCore::AVVideoCaptureSource::session const):
(WebCore::AVVideoCaptureSource::photoOutput):
(WebCore::AVVideoCaptureSource::maxPhotoSizeForCurrentPreset const):
(WebCore::AVVideoCaptureSource::photoConfiguration):
(WebCore::AVVideoCaptureSource::takePhotoInternal):
(WebCore::AVVideoCaptureSource::getPhotoCapabilities):
(WebCore::AVVideoCaptureSource::applyFrameRateAndZoomWithPreset):
(WebCore::AVVideoCaptureSource::areSettingsMatching const):
(WebCore::AVVideoCaptureSource::setSessionSizeFrameRateAndZoom):
(WebCore::AVVideoCaptureSource::updateWhiteBalanceMode):
(WebCore::AVVideoCaptureSource::updateTorch):
(WebCore::AVVideoCaptureSource::setupSession):
(WebCore::AVVideoCaptureSource::setupCaptureSession):
(WebCore::AVVideoCaptureSource::captureDeviceSuspendedDidChange):
(WebCore::AVVideoCaptureSource::captureSessionRuntimeError):
(WebCore::AVVideoCaptureSource::maxPhotoSizeForActiveFormat const): Deleted.

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



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

Reply via email to