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

Unified Diff: third_party/WebKit/Source/core/dom/StyleSheetCollection.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/dom/StyleSheetCollection.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleSheetCollection.cpp b/third_party/WebKit/Source/core/dom/StyleSheetCollection.cpp
index 6e8becc9192f1ccc4ecfb86645254a3f3455f048..bcd99e8b039ac66e5230846ff486219241b60c5b 100644
--- a/third_party/WebKit/Source/core/dom/StyleSheetCollection.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleSheetCollection.cpp
@@ -59,6 +59,15 @@ void StyleSheetCollection::appendSheetForList(StyleSheet* sheet)
m_styleSheetsForStyleSheetList.append(sheet);
}
+void StyleSheetCollection::purgeMemory()
+{
+ WillBeHeapVector<RefPtrWillBeMember<StyleSheet>>::iterator it = m_styleSheetsForStyleSheetList.begin();
+ while (it != m_styleSheetsForStyleSheetList.end()) {
+ (*it)->purgeMemory();
+ ++it;
+ }
+}
+
DEFINE_TRACE(StyleSheetCollection)
{
visitor->trace(m_activeAuthorStyleSheets);
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleSheetCollection.h ('k') | third_party/WebKit/Source/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698