[webkit-changes] [WebKit/WebKit] b96cc3: [Cocoa] Softlink macros are not thread safe

Eric Carlson noreply at github.com
Thu Dec 22 09:15:09 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b96cc31eec98eb98b7f2e0967e9d3199f7879d97
      https://github.com/WebKit/WebKit/commit/b96cc31eec98eb98b7f2e0967e9d3199f7879d97
  Author: Eric Carlson <eric.carlson at apple.com>
  Date:   2022-12-22 (Thu, 22 Dec 2022)

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

  Log Message:
  -----------
  [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




More information about the webkit-changes mailing list