Commit bcb1d430 authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

Capture 3 SkFontMgr in minidump

This patch captures 3 SkFontMgr in minidump so that we can figure
out how SkFontMgr was initialized better from minidump.

Bug: 561873
Change-Id: Icafac73fc0ccc8df4ffffcd01697e2227055eb02
Reviewed-on: https://chromium-review.googlesource.com/923925
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: default avatarDominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537619}
parent 29262379
......@@ -367,19 +367,30 @@ void FontCache::Invalidate() {
}
void FontCache::CrashWithFontInfo(const FontDescription* font_description) {
FontCache* font_cache = FontCache::GetFontCache();
FontCache* font_cache = nullptr;
SkFontMgr* font_mgr = nullptr;
int num_families = std::numeric_limits<int>::min();
bool is_test_font_mgr = false;
if (font_cache) {
if (FontGlobalContext::Get(kDoNotCreate)) {
font_cache = FontCache::GetFontCache();
if (font_cache) {
#if defined(OS_WIN)
is_test_font_mgr = font_cache->is_test_font_mgr_;
is_test_font_mgr = font_cache->is_test_font_mgr_;
#endif
font_mgr = font_cache->font_manager_.get();
if (font_mgr)
num_families = font_mgr->countFamilies();
font_mgr = font_cache->font_manager_.get();
if (font_mgr)
num_families = font_mgr->countFamilies();
}
}
// In production, these 3 font managers must match.
// They don't match in unit tests or in single process mode.
SkFontMgr* static_font_mgr = static_font_manager_;
SkFontMgr* skia_default_font_mgr = SkFontMgr::RefDefault().get();
base::debug::Alias(&font_mgr);
base::debug::Alias(&static_font_mgr);
base::debug::Alias(&skia_default_font_mgr);
FontDescription font_description_copy = *font_description;
base::debug::Alias(&font_description_copy);
base::debug::Alias(&is_test_font_mgr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment