Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: third_party/WebKit/Source/platform/fonts/FontCache.cpp

Issue 2707763003: Capture font-related data in minidump when last resort font failed (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/FontCache.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/FontCache.cpp b/third_party/WebKit/Source/platform/fonts/FontCache.cpp
index 5eddfddc66b58cf86267e23da94bef5adbed27b2..30d64c3e18ec1490398bf1ac4017942418a0ca72 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCache.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontCache.cpp
@@ -29,6 +29,7 @@
#include "platform/fonts/FontCache.h"
+#include <memory>
#include "base/trace_event/process_memory_dump.h"
#include "platform/FontFamilyNames.h"
#include "platform/Histogram.h"
@@ -54,9 +55,9 @@
#include "wtf/PtrUtil.h"
#include "wtf/StdLibExtras.h"
#include "wtf/Vector.h"
+#include "wtf/debug/Alias.h"
#include "wtf/text/AtomicStringHash.h"
#include "wtf/text/StringHash.h"
-#include <memory>
using namespace WTF;
@@ -455,6 +456,24 @@ void FontCache::invalidate() {
purge(ForcePurge);
}
+void FontCache::crashWithFontInfo(const FontDescription* fontDescription) {
+ FontCache* fontCache = FontCache::fontCache();
+ SkFontMgr* fontMgr = nullptr;
+ int numFamilies = std::numeric_limits<int>::min();
+ if (fontCache) {
+ fontMgr = fontCache->m_fontManager.get();
+ if (fontMgr)
+ numFamilies = fontMgr->countFamilies();
+ }
+
+ debug::alias(&fontDescription);
+ debug::alias(&fontCache);
+ debug::alias(&fontMgr);
+ debug::alias(&numFamilies);
+
+ CHECK(false);
+}
+
void FontCache::dumpFontPlatformDataCache(
base::trace_event::ProcessMemoryDump* memoryDump) {
ASSERT(isMainThread());

Powered by Google App Engine
This is Rietveld 408576698