Commit 44015ca0 authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

Capture the 3 SkFontMgr in FontCache::PlatformFallbackFontForCharacter

Similar to CL:923925, this patch captures the 3 default SkFontMgr
to see if they are the same in crash dumps.

Bug: 409784
Change-Id: I9ca760dfbb28f7d23caca05d3311bca05be7d1c1
Reviewed-on: https://chromium-review.googlesource.com/923744Reviewed-by: default avatarDominik Röttsches <drott@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537744}
parent 15d768df
......@@ -32,8 +32,10 @@
#include "platform/fonts/FontCache.h"
#include <memory>
#include "SkFontMgr.h"
#include "SkTypeface_win.h"
#include "base/debug/alias.h"
#include "platform/Language.h"
#include "platform/fonts/BitmapGlyphsBlacklist.h"
#include "platform/fonts/FontDescription.h"
......@@ -169,6 +171,16 @@ scoped_refptr<SimpleFontData> FontCache::PlatformFallbackFontForCharacter(
}
}
// In production, these 3 font managers must match.
// They don't match in unit tests or in single process mode.
// Capture them in minidump for crbug.com/409784
SkFontMgr* font_mgr = font_manager_.get();
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);
// Last resort font list : PanUnicode. CJK fonts have a pretty
// large repertoire. Eventually, we need to scan all the fonts
// on the system to have a Firefox-like coverage.
......
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