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

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

Issue 2130683002: [Experiment] purge-and-suspend Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/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 745d979f619014d132f3afd30088efb834717643..a2d5ebc0c98d78bd0cccbe0a452398e46643fbe4 100644
--- a/third_party/WebKit/Source/core/dom/MemoryCoordinator.cpp
+++ b/third_party/WebKit/Source/core/dom/MemoryCoordinator.cpp
@@ -30,14 +30,15 @@ MemoryCoordinator::~MemoryCoordinator()
void MemoryCoordinator::onMemoryPressure(WebMemoryPressureLevel level)
{
TRACE_EVENT0("blink", "MemoryCoordinator::onMemoryPressure");
+
if (level == WebMemoryPressureLevelCritical) {
// Clear the image cache.
ImageDecodingStore::instance().clear();
- FontCache::fontCache()->invalidate();
- }
- if (ProcessHeap::isLowEndDevice())
memoryCache()->pruneAll();
- WTF::Partitions::decommitFreeableMemory();
haraken 2016/07/07 09:12:25 Where is this called after your CL?
tasak 2016/07/07 09:30:59 Placed in WebMemoryCoordinator::onMemoryPressure(W
+ } else {
+ if (ProcessHeap::isLowEndDevice())
+ memoryCache()->pruneAll();
+ }
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698