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

Unified Diff: ash/wm/window_animations.cc

Issue 10869066: Attempt 2 at Fixes crash introduced @ 153047 (you can hit crash by maximizing a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: The fix Created 8 years, 4 months 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
Index: ash/wm/window_animations.cc
diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc
index 0aae796bd0dc23094ee7a8502bf923e4333bb0b4..e0456d17fe5a1e19e8f8aa9a08e43464bb3d41a7 100644
--- a/ash/wm/window_animations.cc
+++ b/ash/wm/window_animations.cc
@@ -50,7 +50,6 @@ namespace internal {
namespace {
const float kWindowAnimation_Vertical_TranslateY = 15.f;
-bool delayed_old_layer_deletion_in_cross_fade_for_test_ = false;
}
DEFINE_WINDOW_PROPERTY_KEY(WindowVisibilityAnimationType,
@@ -664,13 +663,7 @@ class CrossFadeObserver : public ui::CompositorObserver,
// ui::ImplicitAnimationObserver overrides:
virtual void OnImplicitAnimationsCompleted() OVERRIDE {
- // ImplicitAnimationObserver's base class uses the object after
- // calling this function, so we cannot delete |this|. The |layer_|
- // may be gone by the next message loop run when shutting down, so
- // clean them up now.
- if (!delayed_old_layer_deletion_in_cross_fade_for_test_)
- Cleanup();
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ delete this;
}
private:
@@ -982,9 +975,5 @@ bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, bool visible) {
}
}
-void SetDelayedOldLayerDeletionInCrossFadeForTest(bool value) {
- delayed_old_layer_deletion_in_cross_fade_for_test_ = value;
-}
-
} // namespace internal
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698