@@ -324,6 +324,7 @@ import {
324324 animatingLanes ,
325325 retryClampTime ,
326326 idleClampTime ,
327+ animatingTask ,
327328} from './ReactProfilerTimer' ;
328329
329330// DEV stuff
@@ -1995,7 +1996,7 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber {
19951996 logAnimatingPhase (
19961997 blockingClampTime ,
19971998 clampedRenderStartTime ,
1998- previousUpdateTask ,
1999+ animatingTask ,
19992000 ) ;
20002001 }
20012002 logBlockingStart (
@@ -2048,7 +2049,7 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber {
20482049 logAnimatingPhase (
20492050 transitionClampTime ,
20502051 clampedRenderStartTime ,
2051- previousUpdateTask ,
2052+ animatingTask ,
20522053 ) ;
20532054 }
20542055 logTransitionStart (
@@ -2069,14 +2070,14 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber {
20692070 if ( includesRetryLane ( animatingLanes ) ) {
20702071 // If this lane is still animating, log the time from previous render finishing to now as animating.
20712072 setCurrentTrackFromLanes ( SomeRetryLane ) ;
2072- logAnimatingPhase ( retryClampTime , renderStartTime , previousUpdateTask ) ;
2073+ logAnimatingPhase ( retryClampTime , renderStartTime , animatingTask ) ;
20732074 }
20742075 }
20752076 if ( includesIdleGroupLanes ( lanes ) ) {
20762077 if ( includesIdleGroupLanes ( animatingLanes ) ) {
20772078 // If this lane is still animating, log the time from previous render finishing to now as animating.
20782079 setCurrentTrackFromLanes ( IdleLane ) ;
2079- logAnimatingPhase ( idleClampTime , renderStartTime , previousUpdateTask ) ;
2080+ logAnimatingPhase ( idleClampTime , renderStartTime , animatingTask ) ;
20802081 }
20812082 }
20822083 }
@@ -3667,12 +3668,7 @@ function commitRoot(
36673668 enableProfilerTimer ? suspendedViewTransition : ( null : any ) ,
36683669 enableProfilerTimer
36693670 ? // This callback fires after "pendingEffects" so we need to snapshot the arguments.
3670- finishedViewTransition . bind (
3671- null ,
3672- lanes ,
3673- // TODO: Use a ViewTransition Task
3674- __DEV__ ? workInProgressUpdateTask : null ,
3675- )
3671+ finishedViewTransition . bind ( null , lanes )
36763672 : ( null : any ) ,
36773673 ) ;
36783674 } else {
@@ -3712,15 +3708,13 @@ function suspendedViewTransition(reason: string): void {
37123708 }
37133709}
37143710
3715- function finishedViewTransition (
3716- lanes : Lanes ,
3717- task : null | ConsoleTask , // DEV-only
3718- ) : void {
3711+ function finishedViewTransition ( lanes : Lanes ) : void {
37193712 if ( enableProfilerTimer && enableComponentPerformanceTrack ) {
37203713 if ( ( animatingLanes & lanes ) === NoLanes ) {
37213714 // Was already stopped by some other action or maybe other root.
37223715 return ;
37233716 }
3717+ const task = animatingTask ;
37243718 stopAnimating ( lanes ) ;
37253719 // If an affected track isn't in the middle of rendering or committing, log from the previous
37263720 // finished render until the end of the animation.
@@ -3835,7 +3829,7 @@ function flushLayoutEffects(): void {
38353829 commitEndTime , // The start is the end of the first commit part.
38363830 commitStartTime , // The end is the start of the second commit part.
38373831 suspendedViewTransitionReason ,
3838- workInProgressUpdateTask , // TODO: Use a ViewTransition Task and this is not safe to read in this phase.
3832+ animatingTask ,
38393833 ) ;
38403834 }
38413835 }
@@ -3938,7 +3932,7 @@ function flushSpawnedWork(): void {
39383932 startViewTransitionStartTime ,
39393933 commitEndTime ,
39403934 pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT ,
3941- workInProgressUpdateTask , // TODO: Use a ViewTransition Task.
3935+ animatingTask ,
39423936 ) ;
39433937 if ( pendingDelayedCommitReason !== ABORTED_VIEW_TRANSITION_COMMIT ) {
39443938 pendingDelayedCommitReason = ANIMATION_STARTED_COMMIT ;
@@ -4440,11 +4434,7 @@ function flushPassiveEffectsImpl() {
44404434 passiveEffectStartTime = now ( ) ;
44414435 if ( pendingDelayedCommitReason === ANIMATION_STARTED_COMMIT ) {
44424436 // The animation was started, so we've been animating since that happened.
4443- logAnimatingPhase (
4444- commitEndTime ,
4445- passiveEffectStartTime ,
4446- workInProgressUpdateTask , // TODO: Use a ViewTransition Task
4447- ) ;
4437+ logAnimatingPhase ( commitEndTime , passiveEffectStartTime , animatingTask ) ;
44484438 } else {
44494439 logPaintYieldPhase (
44504440 commitEndTime ,
0 commit comments