Index: ui/wm/core/window_animations.cc |
diff --git a/ui/wm/core/window_animations.cc b/ui/wm/core/window_animations.cc |
index a79db3a15d6c45a76d6cdb78a8e3e7dc2db5035a..ff0184af0e6805156392b1d1a17c62206b51e410 100644 |
--- a/ui/wm/core/window_animations.cc |
+++ b/ui/wm/core/window_animations.cc |
@@ -119,7 +119,6 @@ class HidingWindowAnimationObserverBase : public aura::WindowObserver { |
aura::client::GetAnimationHost(window_); |
if (animation_host) |
animation_host->OnWindowHidingAnimationCompleted(); |
- window_->RemoveObserver(this); |
} |
delete this; |
} |
@@ -128,9 +127,7 @@ class HidingWindowAnimationObserverBase : public aura::WindowObserver { |
// Invoked when the window is destroyed (or destroying). |
void WindowInvalid() { |
layer_owner_->root()->SuppressPaint(); |
- |
- window_->RemoveObserver(this); |
- window_ = NULL; |
+ delete this; |
} |
aura::Window* window_; |