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

Issue 10869066: Attempt 2 at Fixes crash introduced @ 153047 (you can hit crash by maximizing a (Closed)

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

Description

Attempt 2 at Fixes crash introduced @ 153047 (you can hit crash by maximizing a window). The cross fade code deletes the layer when the animation finishes. The newly added code was accessing members after the animation finished and the animator was deleted, resulting in the crash. Since I'm sure this will come up more in the future I've restructured the code to allow for deletion when calling out like this. The cross fade test exercises this code path now, but I'll see about a more focused tests shortly. BUG=none TEST=covered by tests. R=vollick@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=155533

Patch Set 1 #

Patch Set 2 : The fix #

Total comments: 1

Patch Set 3 : Check for destroyed more #

Patch Set 4 : Better fix #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -34 lines) Patch
M ash/wm/window_animations.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M ash/wm/window_animations.cc View 1 2 3 3 chunks +1 line, -12 lines 0 comments Download
M ash/wm/window_animations_unittest.cc View 1 4 chunks +22 lines, -6 lines 0 comments Download
M ui/compositor/layer_animation_observer.h View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/compositor/layer_animation_observer.cc View 1 3 chunks +12 lines, -3 lines 0 comments Download
M ui/compositor/layer_animator.h View 1 2 3 4 chunks +13 lines, -1 line 0 comments Download
M ui/compositor/layer_animator.cc View 1 2 3 5 chunks +52 lines, -8 lines 4 comments Download

Messages

Total messages: 9 (0 generated)
sky
Patchset 1 is the patchset you reviewed last time, 2 the fix. There may be ...
8 years, 4 months ago (2012-08-25 16:01:43 UTC) #1
sky
Ping
8 years, 3 months ago (2012-08-28 17:48:12 UTC) #2
Ian Vollick
On 2012/08/28 17:48:12, sky wrote: > Ping Sorry for the slow reply. This LGTM, but ...
8 years, 3 months ago (2012-08-28 17:59:00 UTC) #3
sky
Is this what you meant? Sorry, I had to merge so the diffs aren't right.
8 years, 3 months ago (2012-09-04 21:00:33 UTC) #4
sky
On 2012/09/04 21:00:33, sky wrote: > Is this what you meant? > > Sorry, I ...
8 years, 3 months ago (2012-09-04 21:57:00 UTC) #5
sky
Ok, I think I got it this time. Take another look? I was forced to ...
8 years, 3 months ago (2012-09-05 23:06:51 UTC) #6
Ian Vollick
LGTM, but I think there are a number of other places where we run the ...
8 years, 3 months ago (2012-09-06 00:57:35 UTC) #7
sky
If these are the only other places that need adjusting I'm happy to do it ...
8 years, 3 months ago (2012-09-06 15:54:07 UTC) #8
Ian Vollick
8 years, 3 months ago (2012-09-07 20:29:50 UTC) #9
On 2012/09/06 15:54:07, sky wrote:
> If these are the only other places that need adjusting I'm happy to do
> it OTOH if you think there are more and want to go through with it you
> can take over the work. I'm fine iether way.
> 

I'm happy to do the work. It seems like it might snowball a little bit since
lots more methods will need to be prepared for 'this' getting destructed. I'm
fine either way, too. It would be nice to get this in this patch, but maybe it
would make more sense to land this now, create a bug and sort the rest out
later.

>   -Scott
> 
> On Wed, Sep 5, 2012 at 5:57 PM,  <mailto:vollick@chromium.org> wrote:
> > LGTM, but I think there are a number of other places where we run the risk
> > of
> > deleting 'this' and should bail (listed below). Maybe it would make sense to
> > create a new bug for this and assign it to me?
> >
> >
> >
>
http://codereview.chromium.org/10869066/diff/23001/ui/compositor/layer_animat...
> > File ui/compositor/layer_animator.cc (right):
> >
> >
>
http://codereview.chromium.org/10869066/diff/23001/ui/compositor/layer_animat...
> > ui/compositor/layer_animator.cc:437:
> > running_animations_copy[i].sequence->duration(), delegate());
> > Seems like there's a chance we could delete 'this' in response to this
> > call to Progress. Could we do the same thing here that we do in
> > FinishAnimation?
> >
> >
>
http://codereview.chromium.org/10869066/diff/23001/ui/compositor/layer_animat...
> > ui/compositor/layer_animator.cc:511:
> > running_animations_copy[i].sequence->duration(), delegate());
> > This seems like another place we can bail early if we've been deleted.
> >
> >
>
http://codereview.chromium.org/10869066/diff/23001/ui/compositor/layer_animat...
> > ui/compositor/layer_animator.cc:532:
> > sequences[i]->Progress(sequences[i]->duration(), delegate());
> > Same here.
> >
> >
>
http://codereview.chromium.org/10869066/diff/23001/ui/compositor/layer_animat...
> > ui/compositor/layer_animator.cc:544:
> > sequence->Progress(sequence->duration(), delegate());
> > Same here.
> >
> > http://codereview.chromium.org/10869066/

Powered by Google App Engine
This is Rietveld 408576698