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

Unified Diff: third_party/WebKit/Source/core/css/StyleSheetContents.cpp

Issue 1658923004: PurgeMemory. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/css/StyleSheetContents.cpp
diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
index fc39002b67f4fddd0c88cdff4f051e99829a50e8..e1c58e44821d9069e427fbf373e6c3f5f5494cbd 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
@@ -662,6 +662,18 @@ void StyleSheetContents::findFontFaceRules(WillBeHeapVector<RawPtrWillBeMember<c
findFontFaceRulesFromRules(childRules(), fontFaceRules);
}
+void StyleSheetContents::purgeMemory()
+{
+ for (unsigned i = 0; i < m_importRules.size(); ++i) {
+ if (!m_importRules[i]->styleSheet())
+ continue;
+ m_importRules[i]->styleSheet()->purgeMemory();
+ }
+ for (WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>>::iterator it = m_childRules.begin(); it != m_childRules.end(); ++it)
+ (*it)->purgeMemory();
+ clearRuleSet();
+}
+
DEFINE_TRACE(StyleSheetContents)
{
#if ENABLE(OILPAN)
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleSheetContents.h ('k') | third_party/WebKit/Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698