Branch: refs/heads/webkitglib/2.52
Home: https://github.com/WebKit/WebKit
Commit: 2feee531598850c1a8fce44008b70c144e61d87f
https://github.com/WebKit/WebKit/commit/2feee531598850c1a8fce44008b70c144e61d87f
Author: David Kilzer <[email protected]>
Date: 2026-01-27 (Tue, 27 Jan 2026)
Changed paths:
M Source/WebCore/platform/graphics/FontRanges.cpp
Log Message:
-----------
Cherry-pick 306238@main (3118028cc9ac).
https://bugs.webkit.org/show_bug.cgi?id=306244
Fix -Wlifetime-safety-permissive warning in
FontRanges::glyphDataForCharacter()
<https://bugs.webkit.org/show_bug.cgi?id=306244>
<rdar://problem/168892583>
Reviewed by Darin Adler.
Clang's lifetime safety warning detected a potential issue where a raw
pointer was assigned from a RefPtr that goes out of scope. Even though
the code was safe (the Font is kept alive by the FontAccessor), the
analyzer couldn't prove the lifetime relationship.
The fix changes `resultFont` from `const Font*` to `RefPtr<const Font>`
to make the lifetime relationship explicit. Also uses `WTF::move(font)`
to avoid ref count churn since `font` isn't used after that point in
the `isInterstitial()` branch.
No new tests since no change in behavior.
* Source/WebCore/platform/graphics/FontRanges.cpp:
(WebCore::FontRanges::glyphDataForCharacter):
Canonical link: https://commits.webkit.org/306238@main
Canonical link: https://commits.webkit.org/305877.20@webkitglib/2.52
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications