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

  Changed paths:
    M Source/JavaScriptCore/bytecode/InlineAccess.cpp
    M Source/JavaScriptCore/jit/SpecializedThunkJIT.h
    M Source/JavaScriptCore/llint/LLIntThunks.cpp
    M Source/WTF/wtf/EnumTraits.h
    M Source/WTF/wtf/text/ASCIILiteral.h
    M Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
    M Source/WebCore/platform/graphics/gstreamer/GStreamerSinksWorkarounds.cpp
    M 
Source/WebCore/platform/graphics/gstreamer/GStreamerVideoFrameConverter.cpp
    M Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/VideoDecoderGStreamer.cpp
    M Source/WebCore/style/computed/StyleComputedStyle+DifferenceLogging.h
    M Source/WebKit/Platform/IPC/Connection.h
    M 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm
    M Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
    M Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.cpp
    M Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp
    M Source/WebKit/WPEPlatform/wpe/WPEDisplayPrivate.h
    M Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp

  Log Message:
  -----------
  Remove most uses of ASCIILiteral::fromLiteralUnsafe()
https://bugs.webkit.org/show_bug.cgi?id=326483

Reviewed by Darin Adler and Philippe Normand.

ASCIILiteral::fromLiteralUnsafe() builds an ASCIILiteral from a raw pointer, 
with no check that it
points to a null-terminated string with static storage duration. Most call 
sites were passing
something that is already a string literal, or a parameter that every caller 
fills with one, so
they can use ASCIILiteral's consteval constructor instead, which is checked at 
compile time.

- Functions whose callers always pass string literals now take an ASCIILiteral 
instead of a
  const char*: linkCodeInline(), SpecializedThunkJIT::finalize(), the LLInt
  generateThunkWithJumpTo*() helpers and wpeDisplayCheckEGLExtension().
- Macros that expand to string literals (GStreamer constants, CMake/Xcode path 
and version
  defines, stringized names) use the consteval constructor, either implicitly 
when the callee
  takes an ASCIILiteral or through ASCIILiteral { MACRO }.
- The IPC MESSAGE_CHECK macros use ASCIILiteral { WTF_PRETTY_FUNCTION }. Clang 
and GCC both
  allow __PRETTY_FUNCTION__ in constant expressions, including in templates, 
lambdas and
  coroutines.
- Add an explicit consteval ASCIILiteral constructor taking a const 
std::array<char, N>&, so
  WTF::nullTerminatedName() can build its result from its static constexpr 
storage. As with the
  string literal constructor, being consteval means it only accepts arrays with 
static storage
  duration and checks the null terminator at compile time.

The remaining callers are the string literal operators, 
StaticStringImpl::literal() and
TextCodecICU, which really do start from a raw pointer.

* Source/JavaScriptCore/bytecode/InlineAccess.cpp:
(JSC::linkCodeInline):
* Source/JavaScriptCore/jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::finalize):
* Source/JavaScriptCore/llint/LLIntThunks.cpp:
(JSC::LLInt::generateThunkWithJumpTo):
(JSC::LLInt::generateThunkWithJumpToPrologue):
(JSC::LLInt::generateThunkWithJumpToLLIntReturnPoint):
* Source/WTF/wtf/EnumTraits.h:
(WTF::nullTerminatedName):
* Source/WTF/wtf/text/ASCIILiteral.h:
(WTF::ASCIILiteral::ASCIILiteral):
* Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
(webKitGLVideoSinkChangeState):
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::requestGLContext):
* Source/WebCore/platform/graphics/gstreamer/GStreamerSinksWorkarounds.cpp:
(WebCore::BaseSinkPositionFlushWorkaroundProbe::checkIsNeeded):
(WebCore::AppSinkFlushCapsWorkaroundProbe::checkIsNeeded):
* Source/WebCore/platform/graphics/gstreamer/GStreamerVideoFrameConverter.cpp:
(WebCore::GStreamerVideoFrameConverter::Pipeline::run):
* Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::getLanguageCode):
(WebCore::TrackDataHolder::tagsChanged):
(WebCore::TrackDataHolder::notifyTrackOfTagsChanged):
* Source/WebCore/platform/graphics/gstreamer/VideoDecoderGStreamer.cpp:
(WebCore::GStreamerInternalVideoDecoder::GStreamerInternalVideoDecoder):
* Source/WebCore/style/computed/StyleComputedStyle+DifferenceLogging.h:
* Source/WebKit/Platform/IPC/Connection.h:
* Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::checkFrameworkVersion):
* Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::bubblewrapSpawn):
* Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.cpp:
(WebKit::XDGDBusProxy::launch):
* Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp:
(wpeDisplayCheckEGLExtension):
* Source/WebKit/WPEPlatform/wpe/WPEDisplayPrivate.h:
* Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp:
(TestWebKitAPI::TEST_F(FileSystemTest, isAncestor)):

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



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

Reply via email to