Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6f1dd314cc55b8f8a74253ea88f0dd77b4fedfc1
      
https://github.com/WebKit/WebKit/commit/6f1dd314cc55b8f8a74253ea88f0dd77b4fedfc1
  Author: David Kilzer <[email protected]>
  Date:   2026-08-11 (Tue, 11 Aug 2026)

  Changed paths:
    M Source/WebCore/platform/graphics/avfoundation/WebAVSampleBufferListener.mm

  Log Message:
  -----------
  WebAVSampleBufferListener should assert the main thread when accessing 
_client in ensureOnMainThread blocks
<https://bugs.webkit.org/show_bug.cgi?id=320431>
<rdar://183392744>

Reviewed by Eric Carlson.

Assert the main thread at the top of each `ensureOnMainThread()` block
in `WebAVSampleBufferListenerPrivate` that reads the `_client` instance
variable.  `_client` is annotated
`WTF_GUARDED_BY_CAPABILITY(mainThread)`, and although every reader
reaches it through `ensureOnMainThread()`, the thread-safety analyzer
cannot infer that the dispatched block body runs on the main thread.
`assertIsMainThread()` supplies the missing main-thread capability so
`-Wthread-safety-analysis` can prove the guarded access is well-formed.

No new tests since no change in behavior.

* Source/WebCore/platform/graphics/avfoundation/WebAVSampleBufferListener.mm:
(-[WebAVSampleBufferListenerPrivate 
observeValueForKeyPath:ofObject:change:context:]):
(-[WebAVSampleBufferListenerPrivate layerFailedToDecode:]):
(-[WebAVSampleBufferListenerPrivate 
layerRequiresFlushToResumeDecodingChanged:]):
(-[WebAVSampleBufferListenerPrivate layerReadyForDisplayChanged:]):
(-[WebAVSampleBufferListenerPrivate audioRendererWasAutomaticallyFlushed:]):

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



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

Reply via email to