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

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: Fixed a comment. 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
« no previous file with comments | « tools/valgrind/memcheck/suppressions.txt ('k') | ui/gfx/compositor/layer_animator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a2008817ad4e5e39cca685b3439f590a059d7f03 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());
}
« no previous file with comments | « tools/valgrind/memcheck/suppressions.txt ('k') | ui/gfx/compositor/layer_animator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698