CString.isEmpty() for String.utf8() returns true when String has a single character#54762
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Dec 3, 2025
Merged
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 7e99966) Details |
darinadler
approved these changes
Dec 3, 2025
csaavedra
reviewed
Dec 3, 2025
| @@ -87,6 +87,23 @@ TEST(WTF, CStringEmptyRegularConstructor) | |||
| ASSERT_STREQ(referenceString, stringWithLength.data()); | |||
| } | |||
|
|
|||
| TEST(WTF, CStringOnyByte) | |||
Member
There was a problem hiding this comment.
Good catch.
Suggested change
| TEST(WTF, CStringOnyByte) | |
| TEST(WTF, CStringOneByte) |
darinadler
approved these changes
Dec 3, 2025
Collaborator
|
EWS run on current version of this PR (hash 98fcf4d) Details |
…ngle character https://bugs.webkit.org/show_bug.cgi?id=303428 Reviewed by Darin Adler. isEmpty was accounting for a null terminator in the CStringBuffer length but it is not like that. Test: Tools/TestWebKitAPI/Tests/WTF/CString.cpp * Source/WTF/wtf/text/CString.h: * Tools/TestWebKitAPI/Tests/WTF/CString.cpp: (TEST(WTF, CStringEmptyRegularConstructor)): (TEST(WTF, CStringOnyByte)): Canonical link: https://commits.webkit.org/303840@main
98fcf4d to
1c43f6f
Compare
Collaborator
|
Committed 303840@main (1c43f6f): https://commits.webkit.org/303840@main Reviewed commits have been landed. Closing PR #54762 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1c43f6f
98fcf4d
🛠 win🧪 wpe-wk2🧪 win-tests🧪 ios-wk2🧪 api-mac🧪 api-wpe🧪 ios-wk2-wpt🧪 api-mac-debug🧪 mac-wk1🧪 gtk-wk2🧪 api-gtk🧪 vision-wk2🧪 mac-intel-wk2🧪 jsc-armv7-tests