Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 322caa92c88287045fe2a6270e7ad4df87c1a4b1
      
https://github.com/WebKit/WebKit/commit/322caa92c88287045fe2a6270e7ad4df87c1a4b1
  Author: Chris Dumez <[email protected]>
  Date:   2026-10-03 (Sat, 03 Oct 2026)

  Changed paths:
    M Source/WTF/wtf/Ref.h
    M Source/WTF/wtf/StdLibExtras.h
    M Source/WebCore/Modules/streams/ReadableStreamDefaultReader.cpp
    M Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
    M Source/WebCore/PAL/pal/PlatformCocoa.cmake
    M Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.cpp
    M Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.h
    A Source/WebCore/PAL/pal/spi/cocoa/DataDetectorsCoreDFASPI.h
    M Source/WebCore/PlatformCocoa.cmake
    M Source/WebCore/SaferCPPExpectations/ForwardDeclCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/MemoryUnsafeCastCheckerExpectations
    M 
Source/WebCore/SaferCPPExpectations/NoUncheckedPtrMemberCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/NoUncountedMemberCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/NoUnretainedMemberCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/RetainPtrCtorAdoptCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/UncheckedLocalVarsCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/UnretainedLocalVarsCheckerExpectations
    M Source/WebCore/SourcesCocoa.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/bindings/js/JSSubscriberCustom.cpp
    M Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp
    M Source/WebCore/bindings/js/JSTrustedTypePolicyCustom.cpp
    M Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
    M Source/WebCore/bindings/js/JSXPathResultCustom.cpp
    M Source/WebCore/html/HTMLMediaElement.cpp
    M Source/WebCore/html/HTMLMediaElement.h
    M Source/WebCore/html/shadow/MediaControlTextTrackContainerElement.h
    M Source/WebCore/html/track/DataCue.h
    M Source/WebCore/html/track/TextTrackCue.h
    M Source/WebCore/html/track/TextTrackCueGeneric.h
    M Source/WebCore/html/track/VTTCue.h
    M Source/WebCore/platform/PODRedBlackTree.h
    M Source/WebCore/platform/audio/cocoa/AudioSampleBufferConverter.mm
    M Source/WebCore/platform/cocoa/SystemVersion.h
    M Source/WebCore/platform/cocoa/SystemVersion.mm
    M Source/WebCore/platform/cocoa/TelephoneNumberDetectorCocoa.cpp
    M Source/WebCore/platform/cocoa/UserAgentCocoa.mm
    M Source/WebCore/platform/cocoa/WebAVPlayerLayer.mm
    M Source/WebCore/platform/cocoa/WebAVPlayerLayerView.mm
    M Source/WebCore/platform/graphics/DisplayRefreshMonitor.h
    M Source/WebCore/platform/graphics/PixelBuffer.h
    M Source/WebCore/platform/graphics/TextRunIterator.h
    M 
Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm
    M Source/WebCore/platform/graphics/ca/FrameProcessIndicators.cpp
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
    M Source/WebCore/platform/graphics/ca/PlatformCALayer.h
    R Source/WebCore/platform/graphics/ca/TileController.cpp
    A Source/WebCore/platform/graphics/ca/TileController.mm
    M Source/WebCore/platform/graphics/ca/TileCoverageMap.cpp
    M Source/WebCore/platform/graphics/ca/TileGrid.cpp
    M Source/WebCore/platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm
    M Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm
    M Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
    M Source/WebCore/platform/graphics/ca/cocoa/WebTiledBackingLayer.mm
    M Source/WebCore/platform/graphics/cg/CGSubimageCacheWithTimer.cpp
    M Source/WebCore/platform/graphics/cg/CGSubimageCacheWithTimer.h
    M Source/WebCore/platform/graphics/cg/GradientCG.cpp
    M Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp
    M Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp
    M Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.cpp
    M Source/WebCore/platform/graphics/cg/ImageBufferCGPDFDocumentBackend.cpp
    M Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp
    M Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp
    M Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp
    M Source/WebCore/platform/graphics/cg/PatternCG.cpp
    M Source/WebCore/platform/graphics/cocoa/CMUtilities.mm
    M Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm
    M Source/WebCore/platform/graphics/cocoa/ImageAdapterCocoa.mm
    M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm
    M Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm
    M Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm
    M Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm
    M Source/WebCore/platform/graphics/filters/DistantLightSource.h
    M Source/WebCore/platform/graphics/filters/LightSource.h
    M Source/WebCore/platform/graphics/filters/PointLightSource.h
    M Source/WebCore/platform/graphics/filters/SpotLightSource.cpp
    M Source/WebCore/platform/graphics/filters/SpotLightSource.h
    M Source/WebCore/platform/graphics/ios/DisplayRefreshMonitorIOS.mm
    M 
Source/WebCore/platform/graphics/transforms/TransformOperationsSharedPrimitivesPrefix.h
    M Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm
    M Source/WebCore/platform/ios/WebEvent.h
    M Source/WebCore/platform/ios/WebEvent.mm
    M Source/WebCore/platform/mediastream/cocoa/ScreenCaptureKitCaptureSource.mm
    M Source/WebCore/platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm
    A Source/WebCore/platform/mediastream/libwebrtc/Dav1dSPI.h
    M Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCDav1dDecoder.cpp
    M Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm

  Log Message:
  -----------
  Address Safer C++ static analysis warnings in WebCore/platform
https://bugs.webkit.org/show_bug.cgi?id=325895

Reviewed by Anne van Kesteren.

Fix most Safer C++ warnings under Source/WebCore/platform and update the
expectations accordingly. GraphicsContextCG.cpp and PathCG.cpp are left alone
because they are performance sensitive.

Raw non-owning members become WeakPtr / ThreadSafeWeakPtr / CheckedPtr /
WeakObjCPtr rather than owning pointers. TextTrackCue becomes CheckedPtr-capable
so that the media element's cue interval tree can hold CheckedPtrs.

* Source/WTF/wtf/Ref.h:
Make CanUseDefaultRefDerefTraits reject void so that protect(CFTypeRef) resolves
to the RetainPtr overload instead of failing to compile.
* Source/WTF/wtf/StdLibExtras.h:
(WTF::memmoveSpan): Mark as NODELETE, like memcpySpan.
* Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.cpp:
* Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.h:
Add CF type traits for CMFormatDescriptionRef and CMTimebaseRef.
* Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
* Source/WebCore/PAL/pal/PlatformCocoa.cmake:
* Source/WebCore/PAL/pal/spi/cocoa/DataDetectorsCoreDFASPI.h: Added.
Move the DDDFA declarations to a system header to address ForwardDecl warnings.
* Source/WebCore/PlatformCocoa.cmake:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
Rename TileController.cpp to TileController.mm and add Dav1dSPI.h.
* Source/WebCore/SaferCPPExpectations/ForwardDeclCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/MemoryUnsafeCastCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/NoUncheckedPtrMemberCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/NoUncountedMemberCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/NoUnretainedMemberCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/RetainPtrCtorAdoptCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UncheckedLocalVarsCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UnretainedLocalVarsCheckerExpectations:
* Source/WebCore/html/HTMLMediaElement.cpp:
* Source/WebCore/html/HTMLMediaElement.h:
* Source/WebCore/html/shadow/MediaControlTextTrackContainerElement.h:
Use CheckedPtr<TextTrackCue> for CueInterval.
* Source/WebCore/html/track/DataCue.h:
* Source/WebCore/html/track/TextTrackCue.h:
* Source/WebCore/html/track/TextTrackCueGeneric.h:
* Source/WebCore/html/track/VTTCue.h:
Make TextTrackCue CanMakeCheckedPtr.
* Source/WebCore/platform/PODRedBlackTree.h:
Move Node out of the class template to avoid a ForwardDecl false positive.
* Source/WebCore/platform/audio/cocoa/AudioSampleBufferConverter.mm:
Suppress a RetainPtrCtorAdopt false positive on CMBufferQueueDequeueAndRetain.
* Source/WebCore/platform/cocoa/SystemVersion.h:
* Source/WebCore/platform/cocoa/SystemVersion.mm:
* Source/WebCore/platform/cocoa/UserAgentCocoa.mm:
* Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm:
Rename systemMarketingVersion() to systemMarketingVersionSingleton().
* Source/WebCore/platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
Use DDDFACacheRef and include DataDetectorsCoreDFASPI.h.
* Source/WebCore/platform/cocoa/WebAVPlayerLayer.mm:
Store pixelBufferAttributes in a RetainPtr.
* Source/WebCore/platform/cocoa/WebAVPlayerLayerView.mm:
* Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm:
Use checked_objc_cast<WebAVPlayerLayer>. Suppress the AVPlayerLayer cast, since
the backing layer is a WebAVPlayerLayer that does not subclass AVPlayerLayer.
* Source/WebCore/platform/graphics/DisplayRefreshMonitor.h:
Subclass ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr.
* Source/WebCore/platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
Use ThreadSafeWeakPtr for the monitor and WeakObjCPtr for the display link.
* Source/WebCore/platform/graphics/PixelBuffer.h:
* Source/WebCore/platform/graphics/filters/DistantLightSource.h:
* Source/WebCore/platform/graphics/filters/LightSource.h:
* Source/WebCore/platform/graphics/filters/PointLightSource.h:
* Source/WebCore/platform/graphics/filters/SpotLightSource.h:
Mark setRange() and computePixelLightingData() as NODELETE.
* Source/WebCore/platform/graphics/filters/SpotLightSource.cpp:
Use std::pow instead of powf.
* Source/WebCore/platform/graphics/TextRunIterator.h:
Use CheckedPtr for m_textRun.
* Source/WebCore/platform/graphics/ca/PlatformCALayer.h:
Include PlatformCALayerClient.h instead of forward-declaring it.
* Source/WebCore/platform/graphics/ca/TileController.mm: Renamed from 
Source/WebCore/platform/graphics/ca/TileController.cpp.
* Source/WebCore/platform/graphics/cg/CGSubimageCacheWithTimer.cpp:
* Source/WebCore/platform/graphics/cg/CGSubimageCacheWithTimer.h:
Hold the singleton in a lock-protected NeverDestroyed<std::unique_ptr>.
* Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp:
* Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:
Hold static CF dictionaries in NeverDestroyed<RetainPtr>.
* Source/WebCore/platform/graphics/cg/PatternCG.cpp:
Retain and release the pattern image explicitly.
* Source/WebCore/platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
Use WeakPtr for the callback.
* Source/WebCore/platform/mediastream/libwebrtc/Dav1dSPI.h: Added.
* Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCDav1dDecoder.cpp:
Include dav1d through a system header.
* Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
* Source/WebCore/platform/graphics/ca/FrameProcessIndicators.cpp:
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
* Source/WebCore/platform/graphics/ca/TileCoverageMap.cpp:
* Source/WebCore/platform/graphics/ca/TileGrid.cpp:
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
* Source/WebCore/platform/graphics/ca/cocoa/WebTiledBackingLayer.mm:
* Source/WebCore/platform/graphics/cg/GradientCG.cpp:
* Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp:
* Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.cpp:
* Source/WebCore/platform/graphics/cg/ImageBufferCGPDFDocumentBackend.cpp:
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
* Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp:
* Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:
* Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm:
* Source/WebCore/platform/graphics/cocoa/ImageAdapterCocoa.mm:
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm:
* Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
* Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm:
* Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm:
* 
Source/WebCore/platform/graphics/transforms/TransformOperationsSharedPrimitivesPrefix.h:
* Source/WebCore/platform/ios/WebEvent.h:
* Source/WebCore/platform/ios/WebEvent.mm:
* Source/WebCore/platform/mediastream/cocoa/ScreenCaptureKitCaptureSource.mm:
Use protect() and smart pointer locals at call sites.

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



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

Reply via email to