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

Issue 10956055: Revert 157567 - Revert 156318 - I had originally tried to build upon http://codereview.chromium.org… (Closed)

Created:
8 years, 3 months ago by Ian Vollick
Modified:
8 years, 3 months ago
Reviewers:
vollick1
CC:
chromium-reviews, Ian Vollick, tfarina, piman+watch_chromium.org, jonathan.backer
Visibility:
Public.

Description

Revert 157567 - 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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=158197

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+348 lines, -148 lines) Patch
M ui/compositor/layer.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/compositor/layer.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M ui/compositor/layer_animation_sequence.h View 1 chunk +3 lines, -3 lines 0 comments Download
M ui/compositor/layer_animation_sequence.cc View 2 chunks +7 lines, -4 lines 0 comments Download
M ui/compositor/layer_animator.h View 7 chunks +20 lines, -17 lines 0 comments Download
M ui/compositor/layer_animator.cc View 17 chunks +53 lines, -86 lines 0 comments Download
M ui/compositor/layer_animator_unittest.cc View 33 chunks +257 lines, -35 lines 0 comments Download
M ui/views/view_unittest.cc View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Ian Vollick
8 years, 3 months ago (2012-09-22 02:14:43 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698