Changeset 204154 in webkit


Ignore:
Timestamp:
Aug 4, 2016, 5:20:48 PM (9 years ago)
Author:
Michael Catanzaro
Message:

[Fontconfig] Segmentation fault in WebCore::FontCache::lastResortFallbackFont
https://bugs.webkit.org/show_bug.cgi?id=141432

Reviewed by Myles C. Maxfield.

Crash more cleanly when we can't find any last resort fallback font.

  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::FontCache::lastResortFallbackFont):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r204150 r204154  
     12016-08-04  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        [Fontconfig] Segmentation fault in WebCore::FontCache::lastResortFallbackFont
     4        https://bugs.webkit.org/show_bug.cgi?id=141432
     5
     6        Reviewed by Myles C. Maxfield.
     7
     8        Crash more cleanly when we can't find any last resort fallback font.
     9
     10        * platform/graphics/freetype/FontCacheFreeType.cpp:
     11        (WebCore::FontCache::lastResortFallbackFont):
     12
    1132016-08-04  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp

    r201979 r204154  
    127127    // matches for non-fallback fonts might return 0. See isFallbackFontAllowed.
    128128    static AtomicString timesStr("serif");
    129     return *fontForFamily(fontDescription, timesStr);
     129    if (RefPtr<Font> font = fontForFamily(fontDescription, timesStr))
     130        return *font;
     131
     132    // This could be reached due to improperly-installed or misconfigured fontconfig.
     133    RELEASE_ASSERT_NOT_REACHED();
    130134}
    131135
Note: See TracChangeset for help on using the changeset viewer.