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

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

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 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
« no previous file with comments | « Source/core/animation/Animation.h ('k') | Source/core/animation/AnimationEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/Animation.cpp
diff --git a/Source/core/animation/Animation.cpp b/Source/core/animation/Animation.cpp
index 0d46063e67fec9d0681b2ddf6bce1999b8e79ed6..689f089a1e955a00b85023a6bd54a2670430d4c5 100644
--- a/Source/core/animation/Animation.cpp
+++ b/Source/core/animation/Animation.cpp
@@ -58,14 +58,14 @@ static unsigned nextSequenceNumber()
}
-PassRefPtrWillBeRawPtr<Animation> Animation::create(AnimationEffect* effect, AnimationTimeline* timeline)
+Animation* Animation::create(AnimationEffect* effect, AnimationTimeline* timeline)
{
if (!timeline) {
// FIXME: Support creating animations without a timeline.
return nullptr;
}
- RefPtrWillBeRawPtr<Animation> animation = adoptRefWillBeNoop(new Animation(timeline->document()->contextDocument().get(), *timeline, effect));
+ Animation* animation = new Animation(timeline->document()->contextDocument().get(), *timeline, effect);
animation->suspendIfNeeded();
if (timeline) {
@@ -73,7 +73,7 @@ PassRefPtrWillBeRawPtr<Animation> Animation::create(AnimationEffect* effect, Ani
animation->attachCompositorTimeline();
}
- return animation.release();
+ return animation;
}
Animation::Animation(ExecutionContext* executionContext, AnimationTimeline& timeline, AnimationEffect* content)
@@ -110,14 +110,17 @@ Animation::Animation(ExecutionContext* executionContext, AnimationTimeline& time
Animation::~Animation()
{
+ destroyCompositorPlayer();
+}
+
+void Animation::disposeAnimation()
+{
#if !ENABLE(OILPAN)
if (m_content)
m_content->detach();
if (m_timeline)
m_timeline->animationDestroyed(this);
#endif
-
- destroyCompositorPlayer();
}
#if !ENABLE(OILPAN)
@@ -1101,7 +1104,7 @@ DEFINE_TRACE(Animation)
visitor->trace(m_pendingFinishedEvent);
visitor->trace(m_finishedPromise);
visitor->trace(m_readyPromise);
- EventTargetWithInlineData::trace(visitor);
+ RefCountedGarbageCollectedEventTargetWithInlineData<Animation>::trace(visitor);
ActiveDOMObject::trace(visitor);
}
« no previous file with comments | « Source/core/animation/Animation.h ('k') | Source/core/animation/AnimationEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698