Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6e3a99f016da2476efe2bdb68c281605afc4a83c
      
https://github.com/WebKit/WebKit/commit/6e3a99f016da2476efe2bdb68c281605afc4a83c
  Author: Chris Dumez <[email protected]>
  Date:   2026-10-07 (Wed, 07 Oct 2026)

  Changed paths:
    M Source/WebCore/SaferCPPExpectations/NoUnretainedMemberCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/RetainPtrCtorAdoptCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/UnretainedLocalVarsCheckerExpectations
    M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
    M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
    M Source/WebCore/platform/graphics/cg/PathCG.cpp
    M Source/WebCore/platform/graphics/cg/PathCG.h
    M Source/WebCore/platform/ios/wak/WKView.h
    M Source/WebCore/platform/ios/wak/WKView.mm
    M Source/WebCore/platform/ios/wak/WebCoreThread.h
    M Source/WebCore/platform/ios/wak/WebCoreThread.mm

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

Reviewed by David Kilzer.

Have GraphicsContextCG::contextForDraw() / contextForState() and
PathCG::ensureMutablePlatformPath() return a const reference to their RetainPtr
data member, so callers can use the CGContext and CGPath without retaining them.
Store the WAK view window and subviews in RetainPtr, and use a Vector of
RetainPtr for the web thread release queue. Suppress the warnings, with a
comment, where ownership is transferred through a void* or where a CF type
cannot be weakly referenced.

This tested as performance neutral on Speedometer and MotionMark.

* Source/WebCore/SaferCPPExpectations/NoUnretainedMemberCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/RetainPtrCtorAdoptCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UnretainedLocalVarsCheckerExpectations:
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::contextForState const):
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
(WebCore::GraphicsContextCG::contextForDraw const):
* Source/WebCore/platform/graphics/cg/PathCG.cpp:
(WebCore::PathCG::ensureMutablePlatformPath):
* Source/WebCore/platform/graphics/cg/PathCG.h:
* Source/WebCore/platform/ios/wak/WKView.h:
* Source/WebCore/platform/ios/wak/WKView.mm:
(_WKViewSetWindow):
(_WKViewDealloc):
(WKViewGetWindow):
(WKViewGetSubviews):
(WKViewAddSubview):
* Source/WebCore/platform/ios/wak/WebCoreThread.h:
* Source/WebCore/platform/ios/wak/WebCoreThread.mm:
(webThreadReleaseObjects):
(WebThreadAdoptAndRelease):
(HandleWebThreadReleaseSource):

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



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

Reply via email to