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

Unified Diff: ui/gfx/compositor/layer_animator.cc

Issue 9371007: Fix a memory leak in the layer animator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove valgrind suppression Created 8 years, 10 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: ui/gfx/compositor/layer_animator.cc
diff --git a/ui/gfx/compositor/layer_animator.cc b/ui/gfx/compositor/layer_animator.cc
index f98904cfd22c99c710f45b573da2cccc1e220266..cc10f04ff949cafd6b78bdd3915ceac290ebff5b 100644
--- a/ui/gfx/compositor/layer_animator.cc
+++ b/ui/gfx/compositor/layer_animator.cc
@@ -396,6 +396,8 @@ void LayerAnimator::ImmediatelySetNewTarget(LayerAnimationSequence* sequence) {
const bool abort = false;
RemoveAllAnimationsWithACommonProperty(sequence, abort);
scoped_ptr<LayerAnimationSequence> removed(RemoveAnimation(sequence));
+ if (!removed.get())
+ removed.reset(sequence);
sky 2012/02/09 03:48:56 Add a comment here.
sequence->Progress(sequence->duration(), delegate());
}

Powered by Google App Engine
This is Rietveld 408576698