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

Unified Diff: Source/core/css/StylePropertySet.h

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/StylePropertySet.h
diff --git a/Source/core/css/StylePropertySet.h b/Source/core/css/StylePropertySet.h
index a09ceabb5d3083a394fc22219dfa4db8979d7c0d..9b187dae5cc556b25f6aef44de3b69103ca1198b 100644
--- a/Source/core/css/StylePropertySet.h
+++ b/Source/core/css/StylePropertySet.h
@@ -41,7 +41,7 @@ class MutableStylePropertySet;
class StylePropertyShorthand;
class StyleSheetContents;
-class StylePropertySet : public RefCountedWillBeRefCountedGarbageCollected<StylePropertySet> {
+class StylePropertySet : public RefCountedWillBeGarbageCollectedFinalized<StylePropertySet> {
haraken 2014/05/08 11:43:45 I think you can now make StylePropertySet GarbageC
wibling-chromium 2014/05/08 12:38:55 Yes, that seems right.
friend class PropertyReference;
public:
@@ -107,7 +107,7 @@ public:
CSSParserMode cssParserMode() const { return static_cast<CSSParserMode>(m_cssParserMode); }
PassRefPtrWillBeRawPtr<MutableStylePropertySet> mutableCopy() const;
- PassRefPtr<ImmutableStylePropertySet> immutableCopyIfNeeded() const;
+ PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> immutableCopyIfNeeded() const;
PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyPropertiesInSet(const Vector<CSSPropertyID>&) const;
@@ -154,7 +154,7 @@ protected:
class ImmutableStylePropertySet : public StylePropertySet {
public:
~ImmutableStylePropertySet();
- static PassRefPtr<ImmutableStylePropertySet> create(const CSSProperty* properties, unsigned count, CSSParserMode);
+ static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> create(const CSSProperty* properties, unsigned count, CSSParserMode);
unsigned propertyCount() const { return m_arraySize; }
@@ -187,11 +187,6 @@ inline const StylePropertyMetadata* ImmutableStylePropertySet::metadataArray() c
DEFINE_TYPE_CASTS(ImmutableStylePropertySet, StylePropertySet, set, !set->isMutable(), !set.isMutable());
-inline ImmutableStylePropertySet* toImmutableStylePropertySet(const RefPtr<StylePropertySet>& set)
-{
- return toImmutableStylePropertySet(set.get());
-}
-
class MutableStylePropertySet : public StylePropertySet {
public:
~MutableStylePropertySet() { }
@@ -247,7 +242,17 @@ private:
DEFINE_TYPE_CASTS(MutableStylePropertySet, StylePropertySet, set, set->isMutable(), set.isMutable());
-inline MutableStylePropertySet* toMutableStylePropertySet(const RefPtr<StylePropertySet>& set)
+inline MutableStylePropertySet* toMutableStylePropertySet(const RefPtrWillBeRawPtr<StylePropertySet>& set)
zerny-chromium 2014/05/08 12:22:26 I wonder why the implicit conversion from Persiste
wibling-chromium 2014/05/08 12:46:41 The problem is the compiler gets confused if there
+{
+ return toMutableStylePropertySet(set.get());
+}
+
+inline MutableStylePropertySet* toMutableStylePropertySet(const Persistent<StylePropertySet>& set)
+{
+ return toMutableStylePropertySet(set.get());
+}
+
+inline MutableStylePropertySet* toMutableStylePropertySet(const Member<StylePropertySet>& set)
{
return toMutableStylePropertySet(set.get());
}

Powered by Google App Engine
This is Rietveld 408576698