Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: a33eba312fbbd5b863c3c65504b3bef9fa659dd8 https://github.com/WebKit/WebKit/commit/a33eba312fbbd5b863c3c65504b3bef9fa659dd8 Author: David Kilzer <ddkil...@apple.com> Date: 2025-03-03 (Mon, 03 Mar 2025)
Changed paths: M Source/WTF/wtf/spi/darwin/XPCSPI.h M Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm M Tools/Scripts/webkitpy/style/checkers/cpp.py M Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py Log Message: ----------- Introduce xpc_string_get_wtfstring() for bounds safety and efficiency <https://bugs.webkit.org/show_bug.cgi?id=288750> <rdar://145785145> Reviewed by Geoffrey Garen. * Source/WTF/wtf/spi/darwin/XPCSPI.h: (xpc_string_get_length): - Add declaration for open source builds. (xpc_string_get_wtfstring): Add. - Convenience method for converting C-string returned from xpc_string_get_string_ptr() into a WTF::String. This is more efficient since it creates a span with the known length of the C-string to construct the WTF::String. * Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: (WebKit::XPCServiceEventHandler): - Make use of xpc_string_get_wtfstring(). - Add a `NOLINT` comment to avoid check-webkit-style warnings for the second use of xpc_string_get_string_ptr() which doesn't need a WTF::String. * Tools/Scripts/webkitpy/style/checkers/cpp.py: (check_safer_cpp): - Add check for xpc_string_get_string_ptr(). (CppChecker): - Enable 'safercpp/xpc_string_get_string_ptr' checker by default. * Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py: (WebKitStyleTest.test_safer_cpp): - Add test for 'safercpp/xpc_string_get_string_ptr' checker. Canonical link: https://commits.webkit.org/291513@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes