Title: [193932] trunk/Source/WebCore
- Revision
- 193932
- Author
- [email protected]
- Date
- 2015-12-10 16:05:00 -0800 (Thu, 10 Dec 2015)
Log Message
[Font Features] r193894 introduces leaks
https://bugs.webkit.org/show_bug.cgi?id=152154
Reviewed by Joe Pecoraro.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::smallCapsTrueTypeDictionary):
(WebCore::createCTFontWithoutSynthesizableFeatures):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (193931 => 193932)
--- trunk/Source/WebCore/ChangeLog 2015-12-11 00:00:01 UTC (rev 193931)
+++ trunk/Source/WebCore/ChangeLog 2015-12-11 00:05:00 UTC (rev 193932)
@@ -1,5 +1,16 @@
2015-12-10 Myles C. Maxfield <[email protected]>
+ [Font Features] r193894 introduces leaks
+ https://bugs.webkit.org/show_bug.cgi?id=152154
+
+ Reviewed by Joe Pecoraro.
+
+ * platform/graphics/cocoa/FontCocoa.mm:
+ (WebCore::smallCapsTrueTypeDictionary):
+ (WebCore::createCTFontWithoutSynthesizableFeatures):
+
+2015-12-10 Myles C. Maxfield <[email protected]>
+
Build fix
Unreviewed.
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm (193931 => 193932)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm 2015-12-11 00:00:01 UTC (rev 193931)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm 2015-12-11 00:05:00 UTC (rev 193932)
@@ -337,8 +337,8 @@
static RetainPtr<CFDictionaryRef> smallCapsTrueTypeDictionary(int rawKey, int rawValue)
{
- CFNumberRef key = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &rawKey);
- CFNumberRef value = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &rawValue);
+ RetainPtr<CFNumberRef> key = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &rawKey));
+ RetainPtr<CFNumberRef> value = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &rawValue));
CFTypeRef keys[] = { kCTFontFeatureTypeIdentifierKey, kCTFontFeatureSelectorIdentifierKey };
CFTypeRef values[] = { key, value };
return adoptCF(CFDictionaryCreate(kCFAllocatorDefault, keys, values, WTF_ARRAY_LENGTH(keys), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
@@ -513,7 +513,7 @@
static RetainPtr<CTFontRef> createCTFontWithoutSynthesizableFeatures(CTFontRef font)
{
- RetainPtr<CFArrayRef> features = static_cast<CFArrayRef>(CTFontCopyAttribute(font, kCTFontFeatureSettingsAttribute));
+ RetainPtr<CFArrayRef> features = adoptCF(static_cast<CFArrayRef>(CTFontCopyAttribute(font, kCTFontFeatureSettingsAttribute)));
if (!features)
return font;
CFIndex featureCount = CFArrayGetCount(features.get());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes