[Webkit-unassigned] [Bug 201893] New: REGRESSION (r247566): Leak of UICTFontDescriptor in WebCore::FontDatabase::InstalledFont::InstalledFont()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 17 19:46:39 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=201893

            Bug ID: 201893
           Summary: REGRESSION (r247566): Leak of UICTFontDescriptor in
                    WebCore::FontDatabase::InstalledFont::InstalledFont()
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Keywords: InRadar
          Severity: Normal
          Priority: P2
         Component: Text
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ddkilzer at webkit.org
                CC: bfulgham at webkit.org, mmaxfield at apple.com,
                    youennf at gmail.com

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>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190918/1d335d8a/attachment.html>


More information about the webkit-unassigned mailing list