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

Unified Diff: Source/core/animation/AnimationPlayer.cpp

Issue 225073004: Oilpan: Completely move core/animations/ to oilpan's heap (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/animation/AnimationPlayer.cpp
diff --git a/Source/core/animation/AnimationPlayer.cpp b/Source/core/animation/AnimationPlayer.cpp
index 545a737c2339c01aa0a353dc58448628dd6587bf..0eb2d269f7ad6507fa8ad24dffb2a9e85cccedff 100644
--- a/Source/core/animation/AnimationPlayer.cpp
+++ b/Source/core/animation/AnimationPlayer.cpp
@@ -48,9 +48,9 @@ static unsigned nextSequenceNumber()
}
-PassRefPtr<AnimationPlayer> AnimationPlayer::create(DocumentTimeline& timeline, TimedItem* content)
+PassRefPtrWillBeRawPtr<AnimationPlayer> AnimationPlayer::create(DocumentTimeline& timeline, TimedItem* content)
{
- return adoptRef(new AnimationPlayer(timeline, content));
+ return adoptRefWillBeRefCountedGarbageCollected(new AnimationPlayer(timeline, content));
}
AnimationPlayer::AnimationPlayer(DocumentTimeline& timeline, TimedItem* content)
@@ -76,10 +76,12 @@ AnimationPlayer::AnimationPlayer(DocumentTimeline& timeline, TimedItem* content)
AnimationPlayer::~AnimationPlayer()
{
+#if !ENABLE(OILPAN)
if (m_content)
m_content->detach();
if (m_timeline)
m_timeline->playerDestroyed(this);
+#endif
}
double AnimationPlayer::sourceEnd() const
@@ -404,11 +406,13 @@ bool AnimationPlayer::SortInfo::operator<(const SortInfo& other) const
return m_sequenceNumber < other.m_sequenceNumber;
}
+#if !ENABLE(OILPAN)
bool AnimationPlayer::canFree() const
{
ASSERT(m_content);
return hasOneRef() && m_content->isAnimation() && m_content->hasOneRef();
}
+#endif
bool AnimationPlayer::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
{
@@ -427,4 +431,10 @@ void AnimationPlayer::pauseForTesting(double pauseTime)
pause();
}
+void AnimationPlayer::trace(Visitor* visitor)
+{
+ visitor->trace(m_content);
+ visitor->trace(m_timeline);
+}
+
} // namespace

Powered by Google App Engine
This is Rietveld 408576698