RESOLVED FIXED 201893
REGRESSION (r247566): Leak of UICTFontDescriptor in WebCore::FontDatabase::InstalledFont::InstalledFont()
https://bugs.webkit.org/show_bug.cgi?id=201893
Summary REGRESSION (r247566): Leak of UICTFontDescriptor in WebCore::FontDatabase::In...
David Kilzer (:ddkilzer)
Reported 2019-09-17 19:46:39 PDT
Leak of UICTFontDescriptor in WebCore::FontDatabase::InstalledFont::InstalledFont(): struct InstalledFont { InstalledFont() = default; InstalledFont(CTFontDescriptorRef fontDescriptor, AllowUserInstalledFonts allowUserInstalledFonts) : fontDescriptor(fontDescriptor) , capabilities(capabilitiesForFontDescriptor(fontDescriptor)) { #if HAVE(CTFONTCREATEFORCHARACTERSWITHLANGUAGEANDOPTION) UNUSED_PARAM(allowUserInstalledFonts); #else if (allowUserInstalledFonts != AllowUserInstalledFonts::No) return; auto attributes = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); addAttributesForInstalledFonts(attributes.get(), allowUserInstalledFonts); this->fontDescriptor = CTFontDescriptorCreateCopyWithAttributes(fontDescriptor, attributes.get()); // LEAK of CTFontDescriptorRef. Missing adoptCF(). #endif } RetainPtr<CTFontDescriptorRef> fontDescriptor; FontSelectionCapabilities capabilities; }; Regressed in: Bug 199769: Make sure to set kCTFontFallbackOptionAttribute to kCTFontFallbackOptionSystem for system fonts <https://bugs.webkit.org/show_bug.cgi?id=199769> <https://trac.webkit.org/changeset/247566/webkit>
Attachments
Patch v1 (1.73 KB, patch)
2019-09-17 19:52 PDT, David Kilzer (:ddkilzer)
no flags
David Kilzer (:ddkilzer)
Comment 1 2019-09-17 19:46:52 PDT
David Kilzer (:ddkilzer)
Comment 2 2019-09-17 19:52:13 PDT
Created attachment 379014 [details] Patch v1
Brent Fulgham
Comment 3 2019-09-17 20:26:40 PDT
Comment on attachment 379014 [details] Patch v1 r=me
WebKit Commit Bot
Comment 4 2019-09-18 04:30:23 PDT
Comment on attachment 379014 [details] Patch v1 Clearing flags on attachment: 379014 Committed r250031: <https://trac.webkit.org/changeset/250031>
WebKit Commit Bot
Comment 5 2019-09-18 04:30:24 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.