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

Issue 284323004: Web Animations: Make AnimationPlayer an ActiveDOMObject (Closed)

Created:
6 years, 7 months ago by dstockwell
Modified:
6 years, 6 months ago
Reviewers:
haraken
CC:
blink-reviews, shans, rjwright, Mike Lawther (Google), blink-reviews-animation_chromium.org, dstockwell, Timothy Loh, Inactive, darktears, arv+blink, Steve Block, watchdog-blink-watchlist_google.com, Eric Willigers
Visibility:
Public.

Description

Web Animations: Make AnimationPlayer an ActiveDOMObject Previously the AnimationPlayer's finish event could have been dispatched after the event handlers had been collected. As these events are queued then dispatched asynchronously via ScriptedAnimationController some special handling is required (tracking when the event is actually dispatched). BUG=376349 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174943

Patch Set 1 #

Patch Set 2 : Remain active until event is dispatched. #

Patch Set 3 : Rebase. #

Total comments: 6

Patch Set 4 : Address comments. #

Total comments: 5

Patch Set 5 : Address comments. #

Patch Set 6 : Allow null context. #

Patch Set 7 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -17 lines) Patch
A LayoutTests/web-animations-api/finish-event-after-gc.html View 1 1 chunk +22 lines, -0 lines 0 comments Download
M Source/core/animation/AnimationPlayer.h View 1 2 3 4 5 6 5 chunks +13 lines, -3 lines 0 comments Download
M Source/core/animation/AnimationPlayer.cpp View 1 2 3 4 5 6 3 chunks +29 lines, -13 lines 0 comments Download
M Source/core/animation/AnimationPlayer.idl View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/animation/AnimationTimeline.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 21 (0 generated)
dstockwell
6 years, 7 months ago (2014-05-23 02:36:11 UTC) #1
haraken
https://codereview.chromium.org/284323004/diff/40001/Source/core/animation/AnimationPlayer.cpp File Source/core/animation/AnimationPlayer.cpp (right): https://codereview.chromium.org/284323004/diff/40001/Source/core/animation/AnimationPlayer.cpp#newcode59 Source/core/animation/AnimationPlayer.cpp:59: : ActiveDOMObject(timeline.document()->contextDocument().get()) Nit: This is a bit redundant way ...
6 years, 7 months ago (2014-05-23 07:15:05 UTC) #2
dstockwell
https://codereview.chromium.org/284323004/diff/40001/Source/core/animation/AnimationPlayer.cpp File Source/core/animation/AnimationPlayer.cpp (right): https://codereview.chromium.org/284323004/diff/40001/Source/core/animation/AnimationPlayer.cpp#newcode59 Source/core/animation/AnimationPlayer.cpp:59: : ActiveDOMObject(timeline.document()->contextDocument().get()) On 2014/05/23 07:15:05, haraken wrote: > > ...
6 years, 7 months ago (2014-05-26 00:47:50 UTC) #3
haraken
https://codereview.chromium.org/284323004/diff/40001/Source/core/animation/AnimationPlayer.h File Source/core/animation/AnimationPlayer.h (right): https://codereview.chromium.org/284323004/diff/40001/Source/core/animation/AnimationPlayer.h#newcode84 Source/core/animation/AnimationPlayer.h:84: virtual bool hasPendingActivity() const OVERRIDE; On 2014/05/26 00:47:50, dstockwell ...
6 years, 7 months ago (2014-05-26 01:16:08 UTC) #4
dstockwell
https://codereview.chromium.org/284323004/diff/40001/Source/core/animation/AnimationPlayer.h File Source/core/animation/AnimationPlayer.h (right): https://codereview.chromium.org/284323004/diff/40001/Source/core/animation/AnimationPlayer.h#newcode84 Source/core/animation/AnimationPlayer.h:84: virtual bool hasPendingActivity() const OVERRIDE; On 2014/05/26 01:16:09, haraken ...
6 years, 7 months ago (2014-05-26 01:32:39 UTC) #5
haraken
Thanks for the clarification, LGTM!
6 years, 7 months ago (2014-05-26 02:37:02 UTC) #6
dstockwell
The CQ bit was checked by dstockwell@chromium.org
6 years, 7 months ago (2014-05-26 03:08:04 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dstockwell@chromium.org/284323004/80001
6 years, 7 months ago (2014-05-26 03:08:14 UTC) #8
dstockwell
The CQ bit was unchecked by dstockwell@chromium.org
6 years, 7 months ago (2014-05-26 03:26:55 UTC) #9
dstockwell
The CQ bit was checked by dstockwell@chromium.org
6 years, 7 months ago (2014-05-28 01:28:44 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dstockwell@chromium.org/284323004/100001
6 years, 7 months ago (2014-05-28 01:29:24 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-28 01:29:34 UTC) #12
commit-bot: I haz the power
Failed to apply patch for Source/core/animation/AnimationPlayer.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 7 months ago (2014-05-28 01:29:35 UTC) #13
dstockwell
The CQ bit was checked by dstockwell@chromium.org
6 years, 7 months ago (2014-05-28 05:38:30 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dstockwell@chromium.org/284323004/120001
6 years, 7 months ago (2014-05-28 05:38:42 UTC) #15
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_rel on tryserver.blink ...
6 years, 7 months ago (2014-05-28 07:02:53 UTC) #16
commit-bot: I haz the power
Change committed as 174943
6 years, 7 months ago (2014-05-28 08:02:28 UTC) #17
kouhei (in TOK)
I think this patch lead to leak: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20Blink&tests=web-animations-api/player-finish-sample-only.html
6 years, 6 months ago (2014-05-30 02:04:15 UTC) #18
kouhei (in TOK)
On 2014/05/30 02:04:15, kouhei wrote: > I think this patch lead to leak: > http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20Blink&tests=web-animations-api/player-finish-sample-only.html ...
6 years, 6 months ago (2014-05-30 02:09:37 UTC) #19
haraken
On 2014/05/30 02:09:37, kouhei wrote: > On 2014/05/30 02:04:15, kouhei wrote: > > I think ...
6 years, 6 months ago (2014-05-30 02:54:01 UTC) #20
dstockwell
6 years, 6 months ago (2014-05-30 09:28:21 UTC) #21
Message was sent while issue was closed.
https://codereview.chromium.org/284323004/diff/60001/Source/core/animation/An...
File Source/core/animation/AnimationPlayer.cpp (right):

https://codereview.chromium.org/284323004/diff/60001/Source/core/animation/An...
Source/core/animation/AnimationPlayer.cpp:301: m_pendingFinishedEvent = nullptr;
On 2014/05/26 01:32:40, dstockwell wrote:
> On 2014/05/26 01:16:09, haraken wrote:
> > 
> > Just to confirm: You don't need to change m_finished to true, right?
> 
> Correct, this is not needed here.

I was wrong. I thought m_finished only needed to become true to dispatch the
event, but we do need to set it here in order to satisfy the conditions of
hasPendingActivity() correctly after stop(). That's the reason for the leak.

Will send a followup patch.

Powered by Google App Engine
This is Rietveld 408576698