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

Unified Diff: third_party/WebKit/Source/core/fetch/FontResource.cpp

Issue 2533503002: Report decoded webfont blob size to memory-infra (Closed)
Patch Set: Created 4 years, 1 month 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/core/fetch/FontResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/FontResource.cpp b/third_party/WebKit/Source/core/fetch/FontResource.cpp
index 98cdd405bcec5d2335c2c717b63397b21e8c9cc7..969389da545fb0afb75f9791a168bd96cd8bfe78 100644
--- a/third_party/WebKit/Source/core/fetch/FontResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/FontResource.cpp
@@ -190,4 +190,15 @@ bool FontResource::isLowPriorityLoadingAllowedForRemoteFont() const {
return true;
}
+void FontResource::onMemoryDump(WebMemoryDumpLevelOfDetail level,
+ WebProcessMemoryDump* memoryDump) const {
+ Resource::onMemoryDump(level, memoryDump);
+ if (!m_fontData)
+ return;
+ const String name = getMemoryDumpName() + "/decoded_webfont";
+ WebMemoryAllocatorDump* dump = memoryDump->createMemoryAllocatorDump(name);
+ dump->addScalar("size", "bytes", m_fontData->dataSize());
+ memoryDump->addSuballocation(dump->guid(), "malloc");
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FontResource.h ('k') | third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698