Log Message
WebCore::genericFamily() should use checked_cf_cast<> <https://webkit.org/b/221521>
Reviewed by Sam Weinig. * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp: (WebCore::genericFamily): - Switch from dynamic_cf_cast<> to checked_cf_cast<> because we always expect a CFStringRef type object to be returned from CTFontDescriptorCopyAttribute().
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (272699 => 272700)
--- trunk/Source/WebCore/ChangeLog 2021-02-11 02:22:21 UTC (rev 272699)
+++ trunk/Source/WebCore/ChangeLog 2021-02-11 02:25:03 UTC (rev 272700)
@@ -1,3 +1,16 @@
+2021-02-10 David Kilzer <[email protected]>
+
+ WebCore::genericFamily() should use checked_cf_cast<>
+ <https://webkit.org/b/221521>
+
+ Reviewed by Sam Weinig.
+
+ * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
+ (WebCore::genericFamily):
+ - Switch from dynamic_cf_cast<> to checked_cf_cast<> because we
+ always expect a CFStringRef type object to be returned from
+ CTFontDescriptorCopyAttribute().
+
2021-02-10 Christopher Reid <[email protected]>
[PlayStation] Add initial RESOURCE_USAGE implementation
Modified: trunk/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp (272699 => 272700)
--- trunk/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp 2021-02-11 02:22:21 UTC (rev 272699)
+++ trunk/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp 2021-02-11 02:25:03 UTC (rev 272700)
@@ -293,7 +293,7 @@
{
return map.ensure(locale, [&] {
auto descriptor = adoptCF(CTFontDescriptorCreateForCSSFamily(ctKey, locale.createCFString().get()));
- auto value = adoptCF(dynamic_cf_cast<CFStringRef>(CTFontDescriptorCopyAttribute(descriptor.get(), kCTFontFamilyNameAttribute)));
+ auto value = adoptCF(checked_cf_cast<CFStringRef>(CTFontDescriptorCopyAttribute(descriptor.get(), kCTFontFamilyNameAttribute)));
return String { value.get() };
}).iterator->value;
}
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
