Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (194288 => 194289)
--- branches/safari-601-branch/Source/WebCore/ChangeLog 2015-12-18 21:11:18 UTC (rev 194288)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog 2015-12-18 21:11:20 UTC (rev 194289)
@@ -1,5 +1,20 @@
2015-12-17 Matthew Hanson <[email protected]>
+ Merge r193932. rdar://problem/23886464
+
+ 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-17 Matthew Hanson <[email protected]>
+
Merge r193894. rdar://problem/23769758
2015-12-10 Myles C. Maxfield <[email protected]>
Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm (194288 => 194289)
--- branches/safari-601-branch/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm 2015-12-18 21:11:18 UTC (rev 194288)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm 2015-12-18 21:11:20 UTC (rev 194289)
@@ -370,10 +370,10 @@
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 };
+ CFTypeRef values[] = { key.get(), value.get() };
return adoptCF(CFDictionaryCreate(kCFAllocatorDefault, keys, values, WTF_ARRAY_LENGTH(keys), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
}
@@ -546,7 +546,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());