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

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

Issue 2130683002: [Experiment] purge-and-suspend Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated 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/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index 1e36ebbccb8fbe5b045ca04e1592ab466fbd15de..0f9fdf57c551f611e3f277d4e53a64c53a121484 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -811,6 +811,14 @@ void StyleEngine::keyframesRulesAdded()
document().timeline().invalidateKeyframeEffects();
}
+void StyleEngine::purgeMemory()
+{
+ clearFontCache();
+ clearResolver();
esprehn 2016/08/05 23:00:58 I think this has some scary side effects, you shou
tasak 2016/08/08 04:47:36 Acknowledged. I would like to ask one thing. Are
+ m_textToSheetCache.clear();
+ m_sheetToTextCache.clear();
esprehn 2016/08/05 23:00:58 This code doesn't really make sense, you're leavin
tasak 2016/08/08 04:47:36 Acknowledged. I agree that basically these caches'
+}
+
DEFINE_TRACE(StyleEngine)
{
visitor->trace(m_document);

Powered by Google App Engine
This is Rietveld 408576698