Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7af5c57acd627ee946c36477f0d0733c0d42654b
      
https://github.com/WebKit/WebKit/commit/7af5c57acd627ee946c36477f0d0733c0d42654b
  Author: Chris Dumez <[email protected]>
  Date:   2026-10-09 (Fri, 09 Oct 2026)

  Changed paths:
    M Source/JavaScriptCore/API/JSScript.mm
    M Source/WTF/WTF.xcodeproj/project.pbxproj
    M Source/WTF/wtf/CMakeLists.txt
    M Source/WTF/wtf/PlatformCocoa.cmake
    M Source/WTF/wtf/cocoa/Entitlements.mm
    A Source/WTF/wtf/darwin/DarwinExtras.h
    M Source/WTF/wtf/darwin/XPCExtras.h
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.mm
    M Source/WebKit/Platform/IPC/cocoa/DaemonConnectionCocoa.mm
    M Source/WebKit/Shared/API/Cocoa/WKRemoteObjectCoder.mm
    M Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm
    M 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonConnectionSet.mm
    M Source/WebKit/Shared/LogStream.mm
    M Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm
    M Source/WebKit/UIProcess/Cocoa/AuxiliaryProcessProxyCocoa.mm
    M Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm
    M Tools/Scripts/webkitpy/style/checkers/cpp.py
    M Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py

  Log Message:
  -----------
  Add typed-string wrappers for the Darwin sandbox, data vault, XPC, os_log and 
Objective-C runtime functions
https://bugs.webkit.org/show_bug.cgi?id=326936

Reviewed by Per Arne Vollan.

Add wrappers that take a UTF8CStringView, so that call sites pass typed strings 
instead of unwrapping
them with legacyCStringPointer():

- XPCExtras.h: xpcDictionarySetString(), xpcArraySetString(), 
xpcConnectionCreateMachService() and
  xpcConnectionCopyEntitlementValue().
- DarwinExtras.h (new): the sandbox_*() functions that take a string, 
rootlessCheckDatavaultFlag(),
  rootlessMkdirDatavault(), osLogCreate(), objcLookUpClass() and objcGetClass().

Like the functions they wrap, they return raw pointers, which callers adopt as 
before. The ones that
return a retained object are annotated OS_OBJECT_RETURNS_RETAINED, so that the 
result is +1 in both ARC
and non-ARC translation units.

Use them at all existing call sites, and add a runtime/darwin_string_wrappers 
style check that suggests
them, with unit tests.

No change in behavior.

* Source/JavaScriptCore/API/JSScript.mm:
* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/PlatformCocoa.cmake:
* Source/WTF/wtf/cocoa/Entitlements.mm:
* Source/WTF/wtf/darwin/DarwinExtras.h: Added.
* Source/WTF/wtf/darwin/XPCExtras.h:
* Source/WebCore/testing/Internals.cpp:
* Source/WebCore/testing/Internals.mm:
* Source/WebKit/Platform/IPC/cocoa/DaemonConnectionCocoa.mm:
* Source/WebKit/Shared/API/Cocoa/WKRemoteObjectCoder.mm:
* Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:
* 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonConnectionSet.mm:
* Source/WebKit/Shared/LogStream.mm:
* Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm:
* Source/WebKit/UIProcess/Cocoa/AuxiliaryProcessProxyCocoa.mm:
* Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
* Tools/Scripts/webkitpy/style/checkers/cpp.py:
* Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py:

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



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

Reply via email to