Title: [250459] trunk/Source/WebCore
- Revision
- 250459
- Author
- [email protected]
- Date
- 2019-09-27 14:05:05 -0700 (Fri, 27 Sep 2019)
Log Message
[Win] Crash under FontCache::lastResortFallbackFont
https://bugs.webkit.org/show_bug.cgi?id=202325
<rdar://problem/47856730>
Reviewed by Brent Fulgham.
As demonstrated by crash reports, there seems to be cases where we are not able to create a last resort fallback font
on Windows. If all attempts to create a fallback font fail, create a font from the default UI font.
No new tests. I have not been able to reproduce this issue.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::lastResortFallbackFont):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (250458 => 250459)
--- trunk/Source/WebCore/ChangeLog 2019-09-27 20:57:23 UTC (rev 250458)
+++ trunk/Source/WebCore/ChangeLog 2019-09-27 21:05:05 UTC (rev 250459)
@@ -1,3 +1,19 @@
+2019-09-27 Per Arne Vollan <[email protected]>
+
+ [Win] Crash under FontCache::lastResortFallbackFont
+ https://bugs.webkit.org/show_bug.cgi?id=202325
+ <rdar://problem/47856730>
+
+ Reviewed by Brent Fulgham.
+
+ As demonstrated by crash reports, there seems to be cases where we are not able to create a last resort fallback font
+ on Windows. If all attempts to create a fallback font fail, create a font from the default UI font.
+
+ No new tests. I have not been able to reproduce this issue.
+
+ * platform/graphics/win/FontCacheWin.cpp:
+ (WebCore::FontCache::lastResortFallbackFont):
+
2019-09-27 Jiewen Tan <[email protected]>
Unreviewed, rolling out r250397.
Modified: trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (250458 => 250459)
--- trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2019-09-27 20:57:23 UTC (rev 250458)
+++ trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2019-09-27 21:05:05 UTC (rev 250459)
@@ -394,8 +394,9 @@
return *simpleFont;
}
- ASSERT_NOT_REACHED();
- return *simpleFont;
+ auto hFont = adoptGDIObject(static_cast<HFONT>(GetStockObject(DEFAULT_GUI_FONT)));
+ FontPlatformData platformData(WTFMove(hFont), fontDescription.computedPixelSize(), false, false, false);
+ return fontForPlatformData(platformData);
}
static LONG toGDIFontWeight(FontSelectionValue fontWeight)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes