Index: views/animation/bounds_animator.cc |
diff --git a/views/animation/bounds_animator.cc b/views/animation/bounds_animator.cc |
index 65ba415082f3b19596363edbc1f183a545434923..fc23e3899984e22102fdb75cf7f18af55e7792b5 100644 |
--- a/views/animation/bounds_animator.cc |
+++ b/views/animation/bounds_animator.cc |
@@ -87,6 +87,13 @@ const SlideAnimation* BoundsAnimator::GetAnimationForView(View* view) { |
void BoundsAnimator::SetAnimationDelegate(View* view, |
AnimationDelegate* delegate, |
bool delete_when_done) { |
+#if defined(OS_LINUX) |
+ if (!IsAnimating(view)) |
+ LOG(ERROR) << "SetAnimationDelegate: not animating view"; |
+ if (data_[view].delegate) |
+ LOG(ERROR) << "SetAnimationDelegate: delegate already set: leaking"; |
+#endif |
+ |
DCHECK(IsAnimating(view)); |
data_[view].delegate = delegate; |
data_[view].delete_delegate_when_done = delete_when_done; |
@@ -111,6 +118,10 @@ void BoundsAnimator::Cancel() { |
if (data_.empty()) |
return; |
+#if defined(OS_LINUX) |
+ LOG(ERROR) << "Cancelling animations"; |
+#endif |
+ |
while (!data_.empty()) |
data_.begin()->second.animation->Stop(); |