Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2d8b6e5a48a1142f7fecb983d787174cbbdd7a2a
      
https://github.com/WebKit/WebKit/commit/2d8b6e5a48a1142f7fecb983d787174cbbdd7a2a
  Author: Chris Dumez <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M Source/WTF/wtf/Assertions.h
    M Source/WTF/wtf/StdLibExtras.h

  Log Message:
  -----------
  Unreviewed build fix after 321137@main
https://bugs.webkit.org/show_bug.cgi?id=324287

321137@main made the LOG and RELEASE_LOG families in wtf/Assertions.h convert 
their arguments
with LOG_PRINTF_TYPE(), which is defined in wtf/StdLibExtras.h. Assertions.h 
does not include
StdLibExtras.h and cannot be made to: StdLibExtras.h includes Assertions.h for 
ASSERT() and the
rest. Every log call site was therefore relying on something else in its 
include graph having
pulled in StdLibExtras.h, and PAL's TextEncodingRegistry.cpp is a build where 
that does not hold,
leaving LOG_PRINTF_TYPE() to be parsed as a call to an undeclared function. 
WebDriver's Logging.h
has the same latent dependency: OPTIONAL_ARGS() uses LOG_PRINTF_TYPE() with 
only wtf/Assertions.h
and wtf/Forward.h included.

Move WTF_FOR_EACH(), safePrintfType(), SAFE_PRINTF_TYPE(), logPrintfType() and 
LOG_PRINTF_TYPE()
from StdLibExtras.h to Assertions.h, next to the macros that expand to them, so 
that including
Assertions.h is enough to use the logging macros. This also keeps the 
conversion in the same
wtf/module.modulemap submodule as its callers, instead of splitting it between 
wtf.Assertions and
the umbrella wtf.Core.

StdLibExtras.h includes Assertions.h, so the SAFE_PRINTF() family and every 
other consumer still
sees all of these. Nothing else changes: the per-type safePrintfType() 
overloads stay in CString.h,
ASCIILiteral.h, CStringView.h, GMallocString.h and NSStringExtras.h and are 
still found by argument
dependent lookup at the point of instantiation, an Objective-C object still 
passes through untouched
for %@, and a bare String is still rejected.

* Source/WTF/wtf/Assertions.h:
(WTF::safePrintfType):
(WTF::requires):
(WTF::logPrintfType):
* Source/WTF/wtf/StdLibExtras.h:
(WTF::safePrintfType): Deleted.
(WTF::logPrintfType): Deleted.

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



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

Reply via email to