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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 273843003: [Oilpan]: Make StylePropertySet fully garbage collected. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 5c412c674ed019f230ad475fbccdcba2dba638f4..183ef9af9d772e02513da113ff66214635bef592 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -106,7 +106,11 @@ RenderStyle* StyleResolver::s_styleNotYetAvailable;
static StylePropertySet* leftToRightDeclaration()
{
+#if ENABLE(OILPAN)
+ DEFINE_STATIC_LOCAL(Persistent<MutableStylePropertySet>, leftToRightDecl, (MutableStylePropertySet::create()));
haraken 2014/05/08 11:43:45 You can avoid #if by using DEFINE_STATIC_REF_WILL_
wibling-chromium 2014/05/08 12:38:55 Done.
+#else
DEFINE_STATIC_REF(MutableStylePropertySet, leftToRightDecl, (MutableStylePropertySet::create()));
+#endif
if (leftToRightDecl->isEmpty())
leftToRightDecl->setProperty(CSSPropertyDirection, CSSValueLtr);
return leftToRightDecl;
@@ -114,7 +118,11 @@ static StylePropertySet* leftToRightDeclaration()
static StylePropertySet* rightToLeftDeclaration()
{
+#if ENABLE(OILPAN)
+ DEFINE_STATIC_LOCAL(Persistent<MutableStylePropertySet>, rightToLeftDecl, (MutableStylePropertySet::create()));
haraken 2014/05/08 11:43:45 You can avoid #if by using DEFINE_STATIC_REF_WILL_
wibling-chromium 2014/05/08 12:38:55 Done.
+#else
DEFINE_STATIC_REF(MutableStylePropertySet, rightToLeftDecl, (MutableStylePropertySet::create()));
+#endif
if (rightToLeftDecl->isEmpty())
rightToLeftDecl->setProperty(CSSPropertyDirection, CSSValueRtl);
return rightToLeftDecl;
@@ -1495,6 +1503,7 @@ bool StyleResolver::mediaQueryAffectedByViewportChange() const
void StyleResolver::trace(Visitor* visitor)
{
visitor->trace(m_keyframesRuleMap);
+ visitor->trace(m_matchedPropertiesCache);
visitor->trace(m_viewportDependentMediaQueryResults);
visitor->trace(m_viewportStyleResolver);
visitor->trace(m_siblingRuleSet);

Powered by Google App Engine
This is Rietveld 408576698