Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 29a96fa5509b3d7930380617ab34b9837c90fb3a
      
https://github.com/WebKit/WebKit/commit/29a96fa5509b3d7930380617ab34b9837c90fb3a
  Author: Chris Dumez <[email protected]>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
    M Source/JavaScriptCore/jit/JIT.cpp
    M Source/JavaScriptCore/jit/JIT.h
    M Source/JavaScriptCore/jsc.cpp
    M Source/WTF/wtf/text/CString.h
    M Source/WebCore/Modules/reporting/DeprecationReportBody.cpp
    M Source/WebCore/Modules/reporting/Report.cpp
    M Source/WebCore/accessibility/AXLogger.h
    M Source/WebCore/loader/PingLoader.cpp
    M Source/WebCore/loader/SubresourceIntegrity.cpp
    M Source/WebCore/page/csp/CSPViolationReportBody.cpp
    M Source/WebCore/platform/network/FormData.cpp
    M Source/WebCore/platform/network/FormData.h
    M Source/WebCore/testing/MockCDMFactory.cpp
    M Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
    M Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
    M Tools/TestWebKitAPI/Tests/WTF/CString.cpp
    M Tools/TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp

  Log Message:
  -----------
  Make CString's literal, buffer and mutable accessors reachable only through 
CStringWithEncoding
https://bugs.webkit.org/show_bug.cgi?id=324791

Reviewed by Darin Adler.

CString(ASCIILiteral), CString(CStringBuffer*), mutableSpan(),
mutableSpanIncludingNullTerminator() and grow() each either put bytes into a
CString or hand out a buffer to put them into, and the encoding-erased base has
no way to say what encoding those bytes are in. They become protected, joining
newUninitialized(). CString(const std::string&) is deleted: it had no callers,
and dropping it removes the implicit std::string conversion.

ASCIILiteral converts to const char*, but CString(ASCIILiteral) is the better
match, so overload resolution still selects it and the access check then rejects
the call: a literal is refused outright rather than quietly losing its length,
and any embedded null, to a strlen. A std::string does still convert to a span,
so there only the implicit conversion goes away. A FIXME marks the two remaining
raw-byte constructors.

JIT::compileTimeStats() keys its map with ASCII stat names, so it and its 
jsc.cpp
consumer are typed ASCIICString, whose data() is the const char* printf wants.
FormData::create() takes a UTF8CString, which is what its callers already hold;
PingLoader builds its body from a byte span instead of allocating a CString.

extractAXLogArg()'s fallback is constrained on derived_from rather than same_as,
so an already-typed UTF8CString reaches the const char* overload instead of 
being
passed to WTFLogAlways as a class type.

* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::lower):
* Source/JavaScriptCore/jit/JIT.cpp:
(JSC::JIT::compileTimeStats):
* Source/JavaScriptCore/jit/JIT.h:
* Source/JavaScriptCore/jsc.cpp:
(runJSC):
* Source/WTF/wtf/text/CString.h:
(WTF::CString::CString):
* Source/WebCore/accessibility/AXLogger.h:
(WebCore::convertAXLogArg):
(WebCore::extractAXLogArg):
* Source/WebCore/loader/PingLoader.cpp:
(WebCore::PingLoader::sendPing):
* Source/WebCore/platform/network/FormData.cpp:
(WebCore::FormData::create):
* Source/WebCore/platform/network/FormData.h:
* Source/WebCore/testing/MockCDMFactory.cpp:
(WebCore::MockCDMInstanceSession::requestLicense):
(WebCore::MockCDMInstanceSession::loadSession):
(WebCore::MockCDMInstanceSession::removeSessionData):
* Tools/TestWebKitAPI/Tests/WTF/CString.cpp:
(TEST(WTF, CStringCopyOnWrite)):
(TEST(WTF, CStringStdStringInterop)):
(TEST(WTF, CStringViewASCIICaseConversions)):
(requires):
* Tools/TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp:
(TestWebKitAPI::textItem):
(TestWebKitAPI::toUpper):
(TestWebKitAPI::ToUpperConverter::ToUpperConverter):
(TestWebKitAPI::ToUpperConverter::startProducing):
(TestWebKitAPI::ToUpperConverter::startConsuming):
(TestWebKitAPI::ToUpperConverter::enqueueLower):
(TestWebKitAPI::TEST(WTF_SynchronizedFixedQueue, ProduceOnly)):
(TestWebKitAPI::TEST(WTF_SynchronizedFixedQueue, Limits)):

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



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

Reply via email to