Bug 142044

Summary: [FreeType] REGRESSION(r180563): Introduced crashes
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebCore Misc.Assignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, mcatanzaro, mmaxfield, mrobinson, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch none

Description Michael Catanzaro 2015-02-26 06:37:22 PST
Zan noticed the following after r180563:

> Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp:307
> -    cairo_font_options_t* options = getDefaultFontOptions();
> +    cairo_font_options_t* options = getDefaultCairoFontOptions();
> +    FcPattern* optionsPattern = m_pattern ? m_pattern.get() : getDefaultFontconfigOptions();
> +    setCairoFontOptionsFromFontConfigPattern(options, optionsPattern);

This properly checks for and works around the possibly-null m_pattern ...

> Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp:324
> +    for (int i = 0; FcPatternGetMatrix(m_pattern.get(), FC_MATRIX, i, &tempFontConfigMatrix) == FcResultMatch; i++)
> +        FcMatrixMultiply(&fontConfigMatrix, &fontConfigMatrix, tempFontConfigMatrix);

... but this doesn't anymore (though it used to), which leads to crashes.

It should be using optionsPattern rather than m_pattern.
Comment 1 Michael Catanzaro 2015-02-26 07:30:50 PST
Created attachment 247426 [details]
Patch
Comment 2 WebKit Commit Bot 2015-02-26 08:24:59 PST
Comment on attachment 247426 [details]
Patch

Clearing flags on attachment: 247426

Committed r180675: <http://trac.webkit.org/changeset/180675>
Comment 3 WebKit Commit Bot 2015-02-26 08:25:03 PST
All reviewed patches have been landed.  Closing bug.