[webkit-changes] [WebKit/WebKit] 83ba7a: Cherry-pick b96cc31eec98. rdar://problem/103003618

Eric Carlson noreply at github.com
Tue Jan 3 12:03:08 PST 2023


  Branch: refs/heads/safari-7615.1.16-branch
  Home:   https://github.com/WebKit/WebKit
  Commit: 83ba7a2701beb6dcb3a26012a9f8b2cc049be5dc
      https://github.com/WebKit/WebKit/commit/83ba7a2701beb6dcb3a26012a9f8b2cc049be5dc
  Author: Eric Carlson <eric.carlson at apple.com>
  Date:   2023-01-03 (Tue, 03 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.h
    M Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.mm

  Log Message:
  -----------
  Cherry-pick b96cc31eec98. rdar://problem/103003618

    [Cocoa] Softlink macros are not thread safe
    https://bugs.webkit.org/show_bug.cgi?id=249725
    rdar://103003618

    Reviewed by Dean Jackson.

    Load and cache AVCaptureDeviceType constants in the AVCaptureDeviceManager constructor,
    which is always called on the main thread, so they can be used on the dispatch queue
    used to discover the current capture devices.

    * Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.h:
    * Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.mm:
    (WebCore::AVCaptureDeviceManager::currentCameras): Use m_avCaptureDeviceTypes instead
    of the soft link functions directly.
    (WebCore::AVCaptureDeviceManager::AVCaptureDeviceManager): Cache AVCaptureDeviceType constants.
    (WebCore::currentCameras): Deleted.

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

Canonical link: https://commits.webkit.org/257979.11@safari-7615.1.16-branch




More information about the webkit-changes mailing list