/[chrome]
Chromium logo

Revision 157567


Jump to revision: Previous Next
Author: vollick@google.com
Date: Wed Sep 19 18:03:40 2012 UTC (18 months, 3 weeks ago)
Changed paths: 8
Log Message:
Revert 156318 - I had originally tried to build upon http://codereview.chromium.org/10869066/, but the number of functions that needed to return (or needed to cope with) DestroyedType's was spiralling out of control and it seemed likely that a mistake would be made and bugs introduced. pkotwicz suggested I make the layer animator ref counted, and this seemed to be a much simpler and safer approach. This way, whenever we're in a LayerAnimator function that may notify observers, we create a scoped_refptr<LayerAnimator> for |this|. If the animator's owning layer gets deleted by an observer, then |this| will be safely destroyed when the function exits and the scoped_refptr falls out of scope.

BUG=147435
TEST=LayerAnimatorTest.ObserverDeletesAnimatorAfter[FinishingAnimation|StoppingAnimation|Scheduling|Aborted]


Review URL: https://chromiumcodereview.appspot.com/10919195

TBR=sky@chromium.org
Review URL: https://codereview.chromium.org/10942034

Changed paths:

Path Details
Directorytrunk/src/ui/compositor/layer.cc modified , text changed
Directorytrunk/src/ui/compositor/layer.h modified , text changed
Directorytrunk/src/ui/compositor/layer_animation_sequence.cc modified , text changed
Directorytrunk/src/ui/compositor/layer_animation_sequence.h modified , text changed
Directorytrunk/src/ui/compositor/layer_animator.cc modified , text changed
Directorytrunk/src/ui/compositor/layer_animator.h modified , text changed
Directorytrunk/src/ui/compositor/layer_animator_unittest.cc modified , text changed
Directorytrunk/src/ui/views/view_unittest.cc modified , text changed

Powered by ViewVC 1.1.5 ViewVC Help