Bug 142044 - [FreeType] REGRESSION(r180563): Introduced crashes
Summary: [FreeType] REGRESSION(r180563): Introduced crashes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-26 06:37 PST by Michael Catanzaro
Modified: 2015-02-26 08:25 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.46 KB, patch)
2015-02-26 07:30 PST, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.