Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 3d5443f7963ad280d0419e45092902c3155dcd9c https://github.com/WebKit/WebKit/commit/3d5443f7963ad280d0419e45092902c3155dcd9c Author: Geoffrey Garen <gga...@apple.com> Date: 2025-01-29 (Wed, 29 Jan 2025)
Changed paths: M Source/JavaScriptCore/API/tests/FunctionToStringTests.cpp M Source/JavaScriptCore/API/tests/JSObjectGetProxyTargetTest.cpp M Source/JavaScriptCore/API/tests/MultithreadedMultiVMExecutionTest.cpp M Source/JavaScriptCore/runtime/ExceptionFuzz.cpp M Source/JavaScriptCore/runtime/ExceptionFuzz.h M Source/WTF/wtf/StdLibExtras.h M Source/WTF/wtf/text/ASCIILiteral.h M Source/WTF/wtf/text/TextStream.cpp M Source/WebCore/PAL/pal/text/TextCodec.cpp M Source/WebCore/bindings/js/GCController.cpp M Source/WebCore/css/StyleProperties.cpp M Source/WebCore/dom/Node.cpp M Source/WebCore/history/HistoryItem.cpp M Source/WebCore/html/HTMLElement.cpp M Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp M Source/WebCore/loader/appcache/ApplicationCache.cpp M Source/WebCore/rendering/CounterNode.cpp M Source/WebCore/rendering/RenderLayer.cpp M Source/WebKit/Shared/WebMemorySampler.cpp M Source/WebKit/webpushd/webpushtool/WebPushToolConnection.mm M Source/WebKit/webpushd/webpushtool/WebPushToolMain.mm Log Message: ----------- Further reduce unsafe printf usage https://bugs.webkit.org/show_bug.cgi?id=286627 <rdar://problem/143766922> Reviewed by Chris Dumez. Added SAFE_FPRINTF and SAFE_SPRINTF. Fixed up some mistakes in the way I imported the FOR_EACH macro, which trigger when you have more than one argument. Deployed SAFE_PRINTF, SAFE_FPRINTF, and SAFE_SPRINTF in all the simple cases. Added a consteval ASCIILiteral constructor from string literal. This enables you to use a string literal directly without adding _s in any context where conversion to ASCIILiteral is unambiguous (e.g., an ASCIILIteral function argument). (It is extremely difficult, but technically possible, to invoke the ASCIILiteral constructor using a manually declared constant array of characters that is not null terminated. So it includes a RELEASE_ASSERT that you didn't do that.) * Source/JavaScriptCore/API/tests/FunctionToStringTests.cpp: (testFunctionToString): * Source/JavaScriptCore/API/tests/JSObjectGetProxyTargetTest.cpp: (testJSObjectGetProxyTarget): * Source/JavaScriptCore/API/tests/MultithreadedMultiVMExecutionTest.cpp: (startMultithreadedMultiVMExecutionTest): (finalizeMultithreadedMultiVMExecutionTest): * Source/JavaScriptCore/runtime/ExceptionFuzz.cpp: (JSC::doExceptionFuzzing): * Source/JavaScriptCore/runtime/ExceptionFuzz.h: (JSC::doExceptionFuzzingIfEnabled): * Source/WTF/wtf/StdLibExtras.h: * Source/WTF/wtf/text/ASCIILiteral.h: * Source/WTF/wtf/text/TextStream.cpp: (WTF::TextStream::operator<<): * Source/WebCore/PAL/pal/text/TextCodec.cpp: (PAL::TextCodec::getUnencodableReplacement): * Source/WebCore/bindings/js/GCController.cpp: (WebCore::GCController::dumpHeapForVM): * Source/WebCore/css/StyleProperties.cpp: (WebCore::StyleProperties::showStyle): * Source/WebCore/dom/Node.cpp: (WebCore::Node::dumpStatistics): (WebCore::Node::showNode const): * Source/WebCore/history/HistoryItem.cpp: (WebCore::HistoryItem::showTreeWithIndent const): * Source/WebCore/html/HTMLElement.cpp: (dumpInnerHTML): * Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::printLayoutTreeForLiveDocuments): * Source/WebCore/loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::dump): * Source/WebCore/rendering/CounterNode.cpp: (WebCore::showTreeAndMark): * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::showLayerTree): * Source/WebKit/Shared/WebMemorySampler.cpp: (WebKit::WebMemorySampler::stop): (WebKit::WebMemorySampler::stopTimerFired): * Source/WebKit/webpushd/webpushtool/WebPushToolConnection.mm: (WebPushTool::Connection::connectToService): (WebPushTool::Connection::sendPushMessage): (WebPushTool::Connection::getPushPermissionState): (WebPushTool::Connection::requestPushPermission): * Source/WebKit/webpushd/webpushtool/WebPushToolMain.mm: * Tools/Scripts/webkitpy/style/checkers/cpp.py: (check_safer_cpp): Canonical link: https://commits.webkit.org/289537@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