| Index: content/browser/web_contents/aura/overscroll_navigation_overlay.cc
|
| diff --git a/content/browser/web_contents/aura/overscroll_navigation_overlay.cc b/content/browser/web_contents/aura/overscroll_navigation_overlay.cc
|
| index dc7f3f651c6f04bef3b541021cf5a94bced180c8..78e3b97f2b2aa7adf7b02568bf03cb9541de48de 100644
|
| --- a/content/browser/web_contents/aura/overscroll_navigation_overlay.cc
|
| +++ b/content/browser/web_contents/aura/overscroll_navigation_overlay.cc
|
| @@ -77,17 +77,12 @@ class OverlayDismissAnimator
|
| // the object deletes itself along with the layer.
|
| void Animate() {
|
| DCHECK(layer_.get());
|
| - // Hold on to LayerAnimator to ensure it is not deleted before animation
|
| - // settings. Without this LayerAnimator would be deleted from SetOpacity if
|
| - // the animation duration is 0.
|
| - scoped_refptr<ui::LayerAnimator> animator(layer_->GetAnimator());
|
| - {
|
| - // This makes SetOpacity() animate with default duration (which could be
|
| - // zero, e.g. when running tests).
|
| - ui::ScopedLayerAnimationSettings settings(animator);
|
| - animator->AddObserver(this);
|
| - layer_->SetOpacity(0);
|
| - }
|
| + ui::LayerAnimator* animator = layer_->GetAnimator();
|
| + // This makes SetOpacity() animate with default duration (which could be
|
| + // zero, e.g. when running tests).
|
| + ui::ScopedLayerAnimationSettings settings(animator);
|
| + animator->AddObserver(this);
|
| + layer_->SetOpacity(0);
|
| }
|
|
|
| // Overridden from ui::LayerAnimationObserver
|
|
|