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

Unified Diff: ash/rotator/screen_rotation_animation.cc

Issue 2473523003: ash: Avoid a shutdown crash in ScreenRotationAnimation. (Closed)
Patch Set: address review comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/rotator/screen_rotation_animation.h ('k') | ash/rotator/screen_rotation_animation_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/rotator/screen_rotation_animation.cc
diff --git a/ash/rotator/screen_rotation_animation.cc b/ash/rotator/screen_rotation_animation.cc
index ecbc75d9935c1a913ce5e076864f90d16d83b223..4e65e543181a9f6dd790be6da5ef46a933d9c11c 100644
--- a/ash/rotator/screen_rotation_animation.cc
+++ b/ash/rotator/screen_rotation_animation.cc
@@ -58,6 +58,11 @@ void ScreenRotationAnimation::OnGetTarget(TargetValue* target) const {
}
void ScreenRotationAnimation::OnAbort(ui::LayerAnimationDelegate* delegate) {
+ // ui::Layer's d'tor passes its ui::LayerAnimator a null delegate before
+ // deleting it. This is then passed here: http://crbug.com/661313
+ if (!delegate)
+ return;
+
TargetValue target_value;
OnGetTarget(&target_value);
delegate->SetTransformFromAnimation(target_value.transform);
« no previous file with comments | « ash/rotator/screen_rotation_animation.h ('k') | ash/rotator/screen_rotation_animation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698