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

Issue 343753007: Fix a leak in wm::AnimateOnChildWindowVisibilityChanged(). (Closed)

Created:
6 years, 6 months ago by please use gerrit instead
Modified:
6 years, 5 months ago
Reviewers:
sky
CC:
chromium-reviews
Project:
chromium
Visibility:
Public.

Description

Fix a leak in wm::AnimateOnChildWindowVisibilityChanged(). RotateHidingWindowAnimationObserver is leaking from wm::AnimateOnChildWindowVisibilityChanged() because it's not observing animation events. The fix is to make RotateHidingWindowAnimationObserver observe the animation events. BUG=389296 TEST=wm_unittests:WindowAnimationsTest.RotateHideNoLeak Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283970

Patch Set 1 #

Patch Set 2 : WindowAnimationsTest.HideRotateAnimationNoLeak fails before the patch if LSan is enabled. #

Patch Set 3 : Test only, which will fail on LSan bots without the fix. #

Patch Set 4 : The fix together with the test only, which will not fail on LSan bots anymore. #

Total comments: 1

Patch Set 5 : Observe changes in layer animator. #

Patch Set 6 : Only the test. #

Patch Set 7 : The test and the fix. #

Total comments: 2

Patch Set 8 : Apply the animation to the correct layer. #

Total comments: 5

Patch Set 9 : Fix spelling in comment. #

Patch Set 10 : Addressed comments. #

Total comments: 2

Patch Set 11 : Remove expect. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -12 lines) Patch
M ui/wm/core/window_animations.cc View 1 2 3 4 5 6 7 8 9 3 chunks +12 lines, -12 lines 0 comments Download
M ui/wm/core/window_animations_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
please use gerrit instead
Scott: PTAL.
6 years, 6 months ago (2014-06-26 21:34:42 UTC) #1
sky
How about test coverage?
6 years, 6 months ago (2014-06-26 22:11:14 UTC) #2
please use gerrit instead
Scott: PTAL Patch Set 2. WindowAnimationsTest.HideRotateAnimationNoLeak fails before the patch if LSan is enabled.
6 years, 6 months ago (2014-06-26 23:29:59 UTC) #3
please use gerrit instead
Scott: To make your life as reviewer easier, I've uploaded the Patch Set 3 that ...
6 years, 6 months ago (2014-06-27 00:56:23 UTC) #4
please use gerrit instead
On 2014/06/27 00:56:23, Rouslan Solomakhin wrote: > Scott: To make your life as reviewer easier, ...
6 years, 5 months ago (2014-06-27 15:49:32 UTC) #5
sky
Yes, please investigate them to make sure they aren't from your patch. -Scott On Fri, ...
6 years, 5 months ago (2014-06-27 18:09:50 UTC) #6
please use gerrit instead
On 2014/06/27 18:09:50, sky wrote: > Yes, please investigate them to make sure they aren't ...
6 years, 5 months ago (2014-06-27 22:11:51 UTC) #7
sky
https://codereview.chromium.org/343753007/diff/60001/ui/wm/core/window_animations.cc File ui/wm/core/window_animations.cc (right): https://codereview.chromium.org/343753007/diff/60001/ui/wm/core/window_animations.cc#newcode115 ui/wm/core/window_animations.cc:115: void OnAnimationCompleted() { I would have thought we end ...
6 years, 5 months ago (2014-06-27 22:32:56 UTC) #8
please use gerrit instead
On 2014/06/27 22:32:56, sky (OOO) wrote: > https://codereview.chromium.org/343753007/diff/60001/ui/wm/core/window_animations.cc > File ui/wm/core/window_animations.cc (right): > > https://codereview.chromium.org/343753007/diff/60001/ui/wm/core/window_animations.cc#newcode115 ...
6 years, 5 months ago (2014-06-27 23:41:50 UTC) #9
please use gerrit instead
On 2014/06/27 23:41:50, Rouslan Solomakhin wrote: > On 2014/06/27 22:32:56, sky (OOO) wrote: > > ...
6 years, 5 months ago (2014-06-30 22:26:07 UTC) #10
please use gerrit instead
Scott: PTAL Patch Sets 6 & 7. Patch Set 6 has only the test, which ...
6 years, 5 months ago (2014-07-01 22:07:33 UTC) #11
please use gerrit instead
On 2014/07/01 22:07:33, Rouslan Solomakhin wrote: > Patch Set 6 has only the test, which ...
6 years, 5 months ago (2014-07-07 21:32:44 UTC) #12
please use gerrit instead
Scott: ping.
6 years, 5 months ago (2014-07-08 16:47:10 UTC) #13
sky
https://codereview.chromium.org/343753007/diff/120001/ui/wm/core/window_animations.cc File ui/wm/core/window_animations.cc (right): https://codereview.chromium.org/343753007/diff/120001/ui/wm/core/window_animations.cc#newcode485 ui/wm/core/window_animations.cc:485: observer->SetLastSequence(last_sequence); If you do this here, doesn't that mean ...
6 years, 5 months ago (2014-07-09 20:32:12 UTC) #14
please use gerrit instead
https://codereview.chromium.org/343753007/diff/120001/ui/wm/core/window_animations.cc File ui/wm/core/window_animations.cc (right): https://codereview.chromium.org/343753007/diff/120001/ui/wm/core/window_animations.cc#newcode485 ui/wm/core/window_animations.cc:485: observer->SetLastSequence(last_sequence); On 2014/07/09 20:32:12, sky wrote: > If you ...
6 years, 5 months ago (2014-07-09 20:53:55 UTC) #15
please use gerrit instead
I think I've figured it out. I need to use ui::ScopedAnimationDurationScaleMode. Let me try it ...
6 years, 5 months ago (2014-07-09 22:09:54 UTC) #16
please use gerrit instead
Scott: PTAL Patch Set 8. It applies the animation to the correct layer.
6 years, 5 months ago (2014-07-14 18:38:49 UTC) #17
sky
https://codereview.chromium.org/343753007/diff/140001/ui/wm/core/window_animations.cc File ui/wm/core/window_animations.cc (right): https://codereview.chromium.org/343753007/diff/140001/ui/wm/core/window_animations.cc#newcode492 ui/wm/core/window_animations.cc:492: observer->detached_layer_tree_root()->GetAnimator()->ScheduleAnimation( Isn't the important part here your changes to ...
6 years, 5 months ago (2014-07-14 19:18:18 UTC) #18
please use gerrit instead
Please see the responses inline. https://codereview.chromium.org/343753007/diff/140001/ui/wm/core/window_animations.cc File ui/wm/core/window_animations.cc (right): https://codereview.chromium.org/343753007/diff/140001/ui/wm/core/window_animations.cc#newcode492 ui/wm/core/window_animations.cc:492: observer->detached_layer_tree_root()->GetAnimator()->ScheduleAnimation( On 2014/07/14 19:18:18, ...
6 years, 5 months ago (2014-07-14 20:12:17 UTC) #19
sky
LayerAnimator has some functions for use in tests. Can you use set_disable_timer_for_test?
6 years, 5 months ago (2014-07-14 21:53:05 UTC) #20
please use gerrit instead
Scott: PTAL Patch Set 10. The trick for unit tests was to call StopAnimating() on ...
6 years, 5 months ago (2014-07-17 03:14:00 UTC) #21
sky
LGTM https://codereview.chromium.org/343753007/diff/180001/ui/wm/core/window_animations_unittest.cc File ui/wm/core/window_animations_unittest.cc (right): https://codereview.chromium.org/343753007/diff/180001/ui/wm/core/window_animations_unittest.cc#newcode305 ui/wm/core/window_animations_unittest.cc:305: EXPECT_NO_FATAL_FAILURE(animating_layer->GetAnimator()->StopAnimating()); None of the call you're calling in ...
6 years, 5 months ago (2014-07-17 15:59:41 UTC) #22
please use gerrit instead
Thank you for the review! Sending to CQ now. https://codereview.chromium.org/343753007/diff/180001/ui/wm/core/window_animations_unittest.cc File ui/wm/core/window_animations_unittest.cc (right): https://codereview.chromium.org/343753007/diff/180001/ui/wm/core/window_animations_unittest.cc#newcode305 ui/wm/core/window_animations_unittest.cc:305: ...
6 years, 5 months ago (2014-07-17 19:43:47 UTC) #23
please use gerrit instead
The CQ bit was checked by rouslan@chromium.org
6 years, 5 months ago (2014-07-17 19:45:11 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rouslan@chromium.org/343753007/200001
6 years, 5 months ago (2014-07-17 19:46:43 UTC) #25
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 5 months ago (2014-07-17 23:41:58 UTC) #26
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-18 00:03:04 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered_tests/builds/172168)
6 years, 5 months ago (2014-07-18 00:03:07 UTC) #28
please use gerrit instead
The CQ bit was checked by rouslan@chromium.org
6 years, 5 months ago (2014-07-18 01:25:28 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rouslan@chromium.org/343753007/200001
6 years, 5 months ago (2014-07-18 01:27:45 UTC) #30
commit-bot: I haz the power
6 years, 5 months ago (2014-07-18 01:46:56 UTC) #31
Message was sent while issue was closed.
Change committed as 283970

Powered by Google App Engine
This is Rietveld 408576698