summaryrefslogtreecommitdiffstats
path: root/ui/gfx/compositor/layer_animator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gfx/compositor/layer_animator.cc')
-rw-r--r--ui/gfx/compositor/layer_animator.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/gfx/compositor/layer_animator.cc b/ui/gfx/compositor/layer_animator.cc
index f98904c..a200881 100644
--- a/ui/gfx/compositor/layer_animator.cc
+++ b/ui/gfx/compositor/layer_animator.cc
@@ -393,9 +393,12 @@ void LayerAnimator::RemoveAllAnimationsWithACommonProperty(
}
void LayerAnimator::ImmediatelySetNewTarget(LayerAnimationSequence* sequence) {
+ // Ensure that sequence is disposed of when this function completes.
+ scoped_ptr<LayerAnimationSequence> to_dispose(sequence);
const bool abort = false;
RemoveAllAnimationsWithACommonProperty(sequence, abort);
- scoped_ptr<LayerAnimationSequence> removed(RemoveAnimation(sequence));
+ LayerAnimationSequence* removed = RemoveAnimation(sequence);
+ DCHECK(removed == NULL || removed == sequence);
sequence->Progress(sequence->duration(), delegate());
}