Title: [237375] trunk/Source/WebCore
Revision
237375
Author
hironori.fu...@sony.com
Date
2018-10-23 21:58:27 -0700 (Tue, 23 Oct 2018)

Log Message

[Win] Assertion fails while destructing local static AtomicString of FontCache::lastResortFallbackFont
https://bugs.webkit.org/show_bug.cgi?id=190748

Reviewed by Myles C. Maxfield.

FontCache::lastResortFallbackFont had local static AtomicString
variables which are not capsuled by NeverDestroyed. Hence, those
variables are destructed on IPC thread when WebProcess exits.

Changed those AtomicString to NeverDestroyed<AtomicString> not to
be destructed on exit.

This change can't be tested automatically because WebKitTestRunner
doesn't support Windows port yet.

* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::lastResortFallbackFont): Changed
fallbackFonts's type from AtomicString array to
NeverDestroyed<AtomicString> array.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (237374 => 237375)


--- trunk/Source/WebCore/ChangeLog	2018-10-23 23:52:20 UTC (rev 237374)
+++ trunk/Source/WebCore/ChangeLog	2018-10-24 04:58:27 UTC (rev 237375)
@@ -1,3 +1,25 @@
+2018-10-23  Fujii Hironori  <hironori.fu...@sony.com>
+
+        [Win] Assertion fails while destructing local static AtomicString of FontCache::lastResortFallbackFont
+        https://bugs.webkit.org/show_bug.cgi?id=190748
+
+        Reviewed by Myles C. Maxfield.
+
+        FontCache::lastResortFallbackFont had local static AtomicString
+        variables which are not capsuled by NeverDestroyed. Hence, those
+        variables are destructed on IPC thread when WebProcess exits.
+
+        Changed those AtomicString to NeverDestroyed<AtomicString> not to
+        be destructed on exit.
+
+        This change can't be tested automatically because WebKitTestRunner
+        doesn't support Windows port yet.
+
+        * platform/graphics/win/FontCacheWin.cpp:
+        (WebCore::FontCache::lastResortFallbackFont): Changed
+        fallbackFonts's type from AtomicString array to
+        NeverDestroyed<AtomicString> array.
+
 2018-10-23  Justin Fan  <justin_...@apple.com>
 
         [WebGPU] Rename old GPU* implementation files to GPULegacy* for WebMetal

Modified: trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (237374 => 237375)


--- trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp	2018-10-23 23:52:20 UTC (rev 237374)
+++ trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp	2018-10-24 04:58:27 UTC (rev 237375)
@@ -351,7 +351,7 @@
     // Search all typical Windows-installed full Unicode fonts.
     // Sorted by most to least glyphs according to http://en.wikipedia.org/wiki/Unicode_typefaces
     // Start with Times New Roman also since it is the default if the user doesn't change prefs.
-    static AtomicString fallbackFonts[] = {
+    static NeverDestroyed<AtomicString> fallbackFonts[] = {
         AtomicString("Times New Roman", AtomicString::ConstructFromLiteral),
         AtomicString("Microsoft Sans Serif", AtomicString::ConstructFromLiteral),
         AtomicString("Tahoma", AtomicString::ConstructFromLiteral),
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to