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

Unified Diff: ui/wm/core/window_animations.cc

Issue 343753007: Fix a leak in wm::AnimateOnChildWindowVisibilityChanged(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: The fix together with the test only, which will not fail on LSan bots anymore. Created 6 years, 6 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
« no previous file with comments | « ash/wm/window_animations_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « ash/wm/window_animations_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698