Summary: | [Win] Assertion fails while destructing local static AtomicString of FontCache::lastResortFallbackFont | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Fujii Hironori <Hironori.Fujii> | ||||||||
Component: | New Bugs | Assignee: | Fujii Hironori <Hironori.Fujii> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | achristensen, bfulgham, don.olmstead, ews-watchlist, mmaxfield, pvollan, rniwa, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Fujii Hironori
2018-10-19 01:04:19 PDT
(In reply to Fujii Hironori from comment #0) > WinCairo, WK1, Debug build, trunk@237282 Oops. I tested with WK2. The string was "Lucida Sans Unicode". It is https://github.com/WebKit/webkit/blob/53d0b766f0692da943a7b01af78940a41581b702/Source/WebCore/platform/graphics/win/FontCacheWin.cpp#L358 Created attachment 352775 [details]
WIP patch
Created attachment 352780 [details]
Patch
Comment on attachment 352780 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352780&action=review > Source/WebCore/platform/graphics/win/FontCacheWin.cpp:354 > - static AtomicString fallbackFonts[] = { > - AtomicString("Times New Roman", AtomicString::ConstructFromLiteral), > - AtomicString("Microsoft Sans Serif", AtomicString::ConstructFromLiteral), > - AtomicString("Tahoma", AtomicString::ConstructFromLiteral), > - AtomicString("Lucida Sans Unicode", AtomicString::ConstructFromLiteral), > - AtomicString("Arial", AtomicString::ConstructFromLiteral) > + const auto fallbackFontNames = { Does NeverDestroyed not work in this context? Comment on attachment 352780 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352780&action=review Thank you very much for reviewing my patch. >> Source/WebCore/platform/graphics/win/FontCacheWin.cpp:354 >> + const auto fallbackFontNames = { > > Does NeverDestroyed not work in this context? I don't use NeverDestroyed because this code path is executed just only once. I think NeverDestroyed should be use only for instances which are used all the time. Review, please. Comment on attachment 352780 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352780&action=review >>> Source/WebCore/platform/graphics/win/FontCacheWin.cpp:354 >>> + const auto fallbackFontNames = { >> >> Does NeverDestroyed not work in this context? > > I don't use NeverDestroyed because this code path is executed just only once. I think NeverDestroyed should be use only for instances which are used all the time. Using string literals still makes them live forever, so I'm not sure why one is preferable over the other. We should be using NeverDestroyed instead. Created attachment 353019 [details]
Patch
You are right. Applied the review feedback.
Comment on attachment 353019 [details] Patch Clearing flags on attachment: 353019 Committed r237375: <https://trac.webkit.org/changeset/237375> All reviewed patches have been landed. Closing bug. |