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

Unified Diff: Source/core/css/StyleSheetList.cpp

Issue 192473003: Move CSSRuleList to the garbage collected heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove outdated comment on CSSRule.h Created 6 years, 9 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: Source/core/css/StyleSheetList.cpp
diff --git a/Source/core/css/StyleSheetList.cpp b/Source/core/css/StyleSheetList.cpp
index bc6b0df930638eda87328d74902cea1a6434bbfd..f5dc2200cdef4ac4ffc173ebf410235de3a8e208 100644
--- a/Source/core/css/StyleSheetList.cpp
+++ b/Source/core/css/StyleSheetList.cpp
@@ -40,7 +40,7 @@ StyleSheetList::~StyleSheetList()
{
}
-inline const Vector<RefPtr<StyleSheet> >& StyleSheetList::styleSheets()
+inline const WillBeHeapVector<RefPtrWillBeMember<StyleSheet> >& StyleSheetList::styleSheets()
{
if (!m_treeScope)
return m_detachedStyleSheets;
@@ -60,7 +60,7 @@ unsigned StyleSheetList::length()
StyleSheet* StyleSheetList::item(unsigned index)
{
- const Vector<RefPtr<StyleSheet> >& sheets = styleSheets();
+ const WillBeHeapVector<RefPtrWillBeMember<StyleSheet> >& sheets = styleSheets();
return index < sheets.size() ? sheets[index].get() : 0;
}
@@ -91,6 +91,7 @@ CSSStyleSheet* StyleSheetList::anonymousNamedGetter(const AtomicString& name)
void StyleSheetList::trace(Visitor* visitor)
{
+ m_detachedStyleSheets.trace(visitor);
zerny-chromium 2014/03/10 14:00:21 Nit: I think the convention is: visitor->trace(m_d
Erik Corry 2014/03/12 10:36:41 Done.
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698