Index: ui/compositor/layer.cc |
=================================================================== |
--- ui/compositor/layer.cc (revision 157564) |
+++ ui/compositor/layer.cc (working copy) |
@@ -95,9 +95,7 @@ |
// Destroying the animator may cause observers to use the layer (and |
// indirectly the WebLayer). Destroy the animator first so that the WebLayer |
// is still around. |
- if (animator_) |
- animator_->SetDelegate(NULL); |
- animator_ = NULL; |
+ animator_.reset(); |
if (compositor_) |
compositor_->SetRootLayer(NULL); |
if (parent_) |
@@ -176,7 +174,7 @@ |
void Layer::SetAnimator(LayerAnimator* animator) { |
if (animator) |
animator->SetDelegate(this); |
- animator_ = animator; |
+ animator_.reset(animator); |
} |
LayerAnimator* Layer::GetAnimator() { |