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

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: Resize expect size of Persistent Created 5 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/Animation.cpp
diff --git a/Source/core/animation/Animation.cpp b/Source/core/animation/Animation.cpp
index aa1ddae606f38a8801d42447d6c71c56ce99bfa3..fe2306a6d13b737d5cf01748eb424c8ccf74016d 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* source, AnimationTimeline* timeline)
+Animation* Animation::create(AnimationEffect* source, AnimationTimeline* timeline)
{
if (!timeline) {
// FIXME: Support creating animations without a timeline.
return nullptr;
}
- RefPtrWillBeRawPtr<Animation> animation = adoptRefWillBeNoop(new Animation(timeline->document()->contextDocument().get(), *timeline, source));
+ Animation* animation = new Animation(timeline->document()->contextDocument().get(), *timeline, source);
animation->suspendIfNeeded();
if (timeline) {
@@ -73,7 +73,7 @@ PassRefPtrWillBeRawPtr<Animation> Animation::create(AnimationEffect* source, Ani
animation->attachCompositorTimeline();
}
- return animation.release();
+ return animation;
}
Animation::Animation(ExecutionContext* executionContext, AnimationTimeline& timeline, AnimationEffect* content)
@@ -107,14 +107,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)

Powered by Google App Engine
This is Rietveld 408576698