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

Unified Diff: third_party/WebKit/Source/web/WebMemoryCoordinator.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/web/WebMemoryCoordinator.cpp
diff --git a/third_party/WebKit/Source/web/WebMemoryCoordinator.cpp b/third_party/WebKit/Source/web/WebMemoryCoordinator.cpp
index 225ee6b90a0ddd70b7ab4bfc33113644e8cef0ed..d26d0ac5818b2d16b058cb4e58f7dd0677fb0dfb 100644
--- a/third_party/WebKit/Source/web/WebMemoryCoordinator.cpp
+++ b/third_party/WebKit/Source/web/WebMemoryCoordinator.cpp
@@ -4,14 +4,25 @@
#include "public/web/WebMemoryCoordinator.h"
+#include "bindings/core/v8/V8PerIsolateData.h"
#include "core/dom/MemoryCoordinator.h"
#include "core/page/Page.h"
+#include "platform/TraceEvent.h"
+#include "platform/fonts/FontCache.h"
+#include "platform/text/CompressibleString.h"
+
namespace blink {
void WebMemoryCoordinator::onMemoryPressure(WebMemoryPressureLevel pressureLevel)
{
MemoryCoordinator::instance().onMemoryPressure(pressureLevel);
+ Page::onMemoryPressure();
+ FontCache::fontCache()->invalidateShapeCache();
+ FontCache::fontCache()->invalidate();
+ V8PerIsolateData::purgeMemory();
+ CompressibleStringImpl::compressAll();
+ WTF::Partitions::decommitFreeableMemory();
bashi 2016/07/08 04:16:22 I think these should be in core::MemoryCoordinator
tasak 2016/07/08 06:47:23 Since I heard that core and modules will be the sa
bashi 2016/07/08 07:09:09 In this case I think we can add a callback in core
tasak 2016/07/19 08:22:51 Done.
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698