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); |