Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b228c1b0d2367017cc45c918603080a4c57ab2bf
https://github.com/WebKit/WebKit/commit/b228c1b0d2367017cc45c918603080a4c57ab2bf
Author: Nathan Solomon <[email protected]>
Date: 2026-02-24 (Tue, 24 Feb 2026)
Changed paths:
M Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations
M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp
Log Message:
-----------
[SaferCPP] Fix UncheckedCallArgsChecker issue in TextUtil.cpp
https://bugs.webkit.org/show_bug.cgi?id=308474
rdar://171002028
Reviewed by Vitor Roriz.
TextUtil.cpp was added to UncheckedCallArgsCheckerExpectations
when a false negative was fixed in
https://github.com/WebKit/WebKit/commit/c612e507973fe45e1c71c1893376818803781495.
Fix the analyzer warning by using protect() to explicitly wrap
raw references in a temporary CheckedRef at the call sites,
telling to the analyzer that the referenced object's lifetime
is guaranteed for the duration of the function call.
Remove TextUtil.cpp from UncheckedCallArgsCheckerExpectations so
the analyzer can verify call arg safety in this file going
forward.
No new tests. There should be no behavior change.
* Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations:
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::width):
(WebCore::Layout::TextUtil::enclosingGlyphBoundsForText):
(WebCore::Layout::TextUtil::breakWord):
(WebCore::Layout::TextUtil::mayBreakInBetween):
(WebCore::Layout::TextUtil::firstUserPerceivedCharacterLength):
(WebCore::Layout::TextUtil::hyphenWidth):
(WebCore::Layout::TextUtil::hangablePunctuationStartWidth):
(WebCore::Layout::TextUtil::hangablePunctuationEndWidth):
(WebCore::Layout::TextUtil::hangableStopOrCommaEndWidth):
Canonical link: https://commits.webkit.org/308141@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications