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

Unified Diff: third_party/WebKit/Source/core/dom/Document.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/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 93c32e8c16a849dad8397c059577c2ca848fd277..0c7f32212d84de1d8587cbe492a3668c5f551cde 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5944,6 +5944,20 @@ LayoutViewItem Document::layoutViewItem() const
return LayoutViewItem(m_layoutView);
}
+void Document::purgeMemory()
+{
+ m_styleEngine->purgeMemory();
+ if (&axObjectCacheOwner() == this)
+ clearAXObjectCache();
+
+ if (m_fetcher)
+ m_fetcher->purgeMemory();
+
+ m_selectorQueryCache.reset();
+ m_canvasFontCache.clear();
+ m_mediaQueryMatcher.clear();
+}
+
DEFINE_TRACE(Document)
{
visitor->trace(m_importsController);

Powered by Google App Engine
This is Rietveld 408576698