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

Unified Diff: Source/core/css/StylePropertySet.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/StylePropertySet.cpp
diff --git a/Source/core/css/StylePropertySet.cpp b/Source/core/css/StylePropertySet.cpp
index 1237fcbfe5737081a8923c34cb94e4dd652e8abc..4cecaf639026bd4ee355dc8674a5d74b0af7ead4 100644
--- a/Source/core/css/StylePropertySet.cpp
+++ b/Source/core/css/StylePropertySet.cpp
@@ -47,7 +47,7 @@ static size_t sizeForImmutableStylePropertySetWithPropertyCount(unsigned count)
return sizeof(ImmutableStylePropertySet) - sizeof(void*) + sizeof(CSSValue*) * count + sizeof(StylePropertyMetadata) * count;
}
-PassRefPtr<ImmutableStylePropertySet> ImmutableStylePropertySet::create(const CSSProperty* properties, unsigned count, CSSParserMode cssParserMode)
+PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> ImmutableStylePropertySet::create(const CSSProperty* properties, unsigned count, CSSParserMode cssParserMode)
{
ASSERT(count <= MaxArraySize);
#if ENABLE(OILPAN)
@@ -55,10 +55,10 @@ PassRefPtr<ImmutableStylePropertySet> ImmutableStylePropertySet::create(const CS
#else
void* slot = WTF::fastMalloc(sizeForImmutableStylePropertySetWithPropertyCount(count));
#endif // ENABLE(OILPAN)
- return adoptRefWillBeRefCountedGarbageCollected(new (slot) ImmutableStylePropertySet(properties, count, cssParserMode));
+ return adoptRefWillBeNoop(new (slot) ImmutableStylePropertySet(properties, count, cssParserMode));
}
-PassRefPtr<ImmutableStylePropertySet> StylePropertySet::immutableCopyIfNeeded() const
+PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> StylePropertySet::immutableCopyIfNeeded() const
{
if (!isMutable())
return toImmutableStylePropertySet(const_cast<StylePropertySet*>(this));
@@ -520,7 +520,7 @@ void MutableStylePropertySet::removeEquivalentProperties(const CSSStyleDeclarati
PassRefPtrWillBeRawPtr<MutableStylePropertySet> StylePropertySet::mutableCopy() const
{
- return adoptRefWillBeRefCountedGarbageCollected(new MutableStylePropertySet(*this));
+ return adoptRefWillBeNoop(new MutableStylePropertySet(*this));
}
PassRefPtrWillBeRawPtr<MutableStylePropertySet> StylePropertySet::copyPropertiesInSet(const Vector<CSSPropertyID>& properties) const
@@ -579,7 +579,7 @@ unsigned StylePropertySet::averageSizeInBytes()
}
// See the function above if you need to update this.
-struct SameSizeAsStylePropertySet : public RefCountedWillBeRefCountedGarbageCollected<SameSizeAsStylePropertySet> {
+struct SameSizeAsStylePropertySet : public RefCountedWillBeGarbageCollectedFinalized<SameSizeAsStylePropertySet> {
unsigned bitfield;
};
COMPILE_ASSERT(sizeof(StylePropertySet) == sizeof(SameSizeAsStylePropertySet), style_property_set_should_stay_small);
@@ -593,12 +593,12 @@ void StylePropertySet::showStyle()
PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create(CSSParserMode cssParserMode)
{
- return adoptRefWillBeRefCountedGarbageCollected(new MutableStylePropertySet(cssParserMode));
+ return adoptRefWillBeNoop(new MutableStylePropertySet(cssParserMode));
}
PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create(const CSSProperty* properties, unsigned count)
{
- return adoptRefWillBeRefCountedGarbageCollected(new MutableStylePropertySet(properties, count));
+ return adoptRefWillBeNoop(new MutableStylePropertySet(properties, count));
}
String StylePropertySet::PropertyReference::cssName() const

Powered by Google App Engine
This is Rietveld 408576698