Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9626df6128f7386fcc31bd5cd01b56e95a35573b
https://github.com/WebKit/WebKit/commit/9626df6128f7386fcc31bd5cd01b56e95a35573b
Author: Chris Dumez <[email protected]>
Date: 2026-10-11 (Sun, 11 Oct 2026)
Changed paths:
M Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.cpp
M Source/WTF/wtf/text/icu/TextBreakIteratorICU.h
M Source/WTF/wtf/text/icu/UnicodeExtras.h
M Source/WebCore/editing/ICUSearcher.cpp
M Source/WebCore/platform/sql/SQLiteDatabase.cpp
M Source/WebCore/platform/sql/SQLiteExtras.h
M Source/WebCore/platform/text/LocaleICU.cpp
M Source/WebCore/rendering/RenderText.cpp
M Source/WebKit/Shared/Extensions/WebExtensionSQLiteDatabase.cpp
M Source/WebKit/Shared/Extensions/WebExtensionSQLiteStatement.cpp
M Tools/Scripts/webkitpy/style/checkers/cpp.py
M Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
Log Message:
-----------
Add typed-string wrappers for the ICU functions that take a locale and for
the SQLite functions that take a string
https://bugs.webkit.org/show_bug.cgi?id=326940
Reviewed by Darin Adler.
Add wrappers that take a UTF8CStringView, so that call sites pass typed strings
instead of unwrapping
them with legacyCStringPointer():
- UnicodeExtras.h: ubrkOpen(), ucalOpen(), ucolOpen(), udatOpen(),
udatpgOpen(), unumOpen(), usearchOpen(),
uStrToTitle(), uStrToLower() and uStrToUpper(), which only change the type of
the locale parameter.
- SQLiteExtras.h: sqliteOpen(), sqlitePrepare(), sqliteCreateCollation() and
sqliteResultError().
sqlitePrepare() passes the query length including the null terminator, so
SQLite does not copy it.
Use them at all existing call sites, and add style checks that suggest them.
The SQLite checks flag any
call to the wrapped functions, like the existing sqlite3_bind_text() check.
Also register the existing
safercpp/sqlite3_* categories, which were missing, and add unit tests for them.
No change in behavior.
* Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.cpp:
* Source/WTF/wtf/text/icu/TextBreakIteratorICU.h:
* Source/WTF/wtf/text/icu/UnicodeExtras.h:
* Source/WebCore/editing/ICUSearcher.cpp:
* Source/WebCore/platform/sql/SQLiteDatabase.cpp:
* Source/WebCore/platform/sql/SQLiteExtras.h:
* Source/WebCore/platform/text/LocaleICU.cpp:
* Source/WebCore/rendering/RenderText.cpp:
* Source/WebKit/Shared/Extensions/WebExtensionSQLiteDatabase.cpp:
* Source/WebKit/Shared/Extensions/WebExtensionSQLiteStatement.cpp:
* Tools/Scripts/webkitpy/style/checkers/cpp.py:
* Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py:
Canonical link: https://commits.webkit.org/323410@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications