Title: [250466] branches/safari-608-branch/Source/WebCore
Revision
250466
Author
[email protected]
Date
2019-09-27 15:53:12 -0700 (Fri, 27 Sep 2019)

Log Message

Cherry-pick r250459. rdar://problem/55797570

    [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):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250459 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (250465 => 250466)


--- branches/safari-608-branch/Source/WebCore/ChangeLog	2019-09-27 22:45:12 UTC (rev 250465)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog	2019-09-27 22:53:12 UTC (rev 250466)
@@ -1,5 +1,42 @@
 2019-09-27  Alan Coon  <[email protected]>
 
+        Cherry-pick r250459. rdar://problem/55797570
+
+    [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):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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  Alan Coon  <[email protected]>
+
         Cherry-pick r250365. rdar://problem/55770710
 
     Update selections after scrolling for iframes and hide selections while iframes and overflow scrolls are scrolling.

Modified: branches/safari-608-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (250465 => 250466)


--- branches/safari-608-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp	2019-09-27 22:45:12 UTC (rev 250465)
+++ branches/safari-608-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp	2019-09-27 22:53:12 UTC (rev 250466)
@@ -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

Reply via email to