[SVG -> OTF Converter] Crashes when SVG font is invalid
https://bugs.webkit.org/show_bug.cgi?id=140378
Reviewed by Antti Koivisto.
Because CachedSVGFonts are cached, they have to be able to be used
in subsequent documents regardless how the first document left it.
Tests: fast/css/font-face-svg-decoding-error.html
svg/custom/svg-fonts-in-html.html
svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData):
* loader/cache/CachedFont.h:
* loader/cache/CachedSVGFont.cpp:
(WebCore::CachedSVGFont::getFontData):
(WebCore::CachedSVGFont::ensureCustomFontData):
(WebCore::CachedSVGFont::maybeInitializeExternalSVGFontElement):
* loader/cache/CachedSVGFont.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178628
268f45cc-cd09-0410-ab3c-
d52691b4dbfc