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

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: 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 f6628b6448252e74358d5de8bdf1a83e0f12c688..4a9a73bf46cd73e282b3b891f1bc02cb6ae6bd96 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();
+ m_textToSheetCache.clear();
+ m_sheetToTextCache.clear();
+}
+
DEFINE_TRACE(StyleEngine)
{
visitor->trace(m_document);

Powered by Google App Engine
This is Rietveld 408576698