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

Unified Diff: third_party/WebKit/Source/core/dom/MemoryCoordinator.cpp

Issue 2081333004: Purge FontCache on memory pressure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/MemoryCoordinator.cpp
diff --git a/third_party/WebKit/Source/core/dom/MemoryCoordinator.cpp b/third_party/WebKit/Source/core/dom/MemoryCoordinator.cpp
index e7dd1e708a26f92d54eae4b25e4da5d02dbcac77..745d979f619014d132f3afd30088efb834717643 100644
--- a/third_party/WebKit/Source/core/dom/MemoryCoordinator.cpp
+++ b/third_party/WebKit/Source/core/dom/MemoryCoordinator.cpp
@@ -6,6 +6,7 @@
#include "core/fetch/MemoryCache.h"
#include "platform/TraceEvent.h"
+#include "platform/fonts/FontCache.h"
#include "platform/graphics/ImageDecodingStore.h"
#include "platform/heap/Heap.h"
#include "wtf/allocator/Partitions.h"
@@ -32,6 +33,7 @@ void MemoryCoordinator::onMemoryPressure(WebMemoryPressureLevel level)
if (level == WebMemoryPressureLevelCritical) {
// Clear the image cache.
ImageDecodingStore::instance().clear();
+ FontCache::fontCache()->invalidate();
tasak 2016/06/27 06:55:37 Would you add the following? FontCache::fontCache(
}
if (ProcessHeap::isLowEndDevice())
memoryCache()->pruneAll();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698