@@ -324,6 +324,7 @@ import {
324
324
animatingLanes ,
325
325
retryClampTime ,
326
326
idleClampTime ,
327
+ animatingTask ,
327
328
} from './ReactProfilerTimer' ;
328
329
329
330
// DEV stuff
@@ -1995,7 +1996,7 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber {
1995
1996
logAnimatingPhase (
1996
1997
blockingClampTime ,
1997
1998
clampedRenderStartTime ,
1998
- previousUpdateTask ,
1999
+ animatingTask ,
1999
2000
) ;
2000
2001
}
2001
2002
logBlockingStart (
@@ -2048,7 +2049,7 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber {
2048
2049
logAnimatingPhase (
2049
2050
transitionClampTime ,
2050
2051
clampedRenderStartTime ,
2051
- previousUpdateTask ,
2052
+ animatingTask ,
2052
2053
) ;
2053
2054
}
2054
2055
logTransitionStart (
@@ -2069,14 +2070,14 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber {
2069
2070
if ( includesRetryLane ( animatingLanes ) ) {
2070
2071
// If this lane is still animating, log the time from previous render finishing to now as animating.
2071
2072
setCurrentTrackFromLanes ( SomeRetryLane ) ;
2072
- logAnimatingPhase ( retryClampTime , renderStartTime , previousUpdateTask ) ;
2073
+ logAnimatingPhase ( retryClampTime , renderStartTime , animatingTask ) ;
2073
2074
}
2074
2075
}
2075
2076
if ( includesIdleGroupLanes ( lanes ) ) {
2076
2077
if ( includesIdleGroupLanes ( animatingLanes ) ) {
2077
2078
// If this lane is still animating, log the time from previous render finishing to now as animating.
2078
2079
setCurrentTrackFromLanes ( IdleLane ) ;
2079
- logAnimatingPhase ( idleClampTime , renderStartTime , previousUpdateTask ) ;
2080
+ logAnimatingPhase ( idleClampTime , renderStartTime , animatingTask ) ;
2080
2081
}
2081
2082
}
2082
2083
}
@@ -3667,12 +3668,7 @@ function commitRoot(
3667
3668
enableProfilerTimer ? suspendedViewTransition : ( null : any ) ,
3668
3669
enableProfilerTimer
3669
3670
? // 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 )
3676
3672
: ( null : any ) ,
3677
3673
) ;
3678
3674
} else {
@@ -3712,15 +3708,13 @@ function suspendedViewTransition(reason: string): void {
3712
3708
}
3713
3709
}
3714
3710
3715
- function finishedViewTransition (
3716
- lanes : Lanes ,
3717
- task : null | ConsoleTask , // DEV-only
3718
- ) : void {
3711
+ function finishedViewTransition ( lanes : Lanes ) : void {
3719
3712
if ( enableProfilerTimer && enableComponentPerformanceTrack ) {
3720
3713
if ( ( animatingLanes & lanes ) === NoLanes ) {
3721
3714
// Was already stopped by some other action or maybe other root.
3722
3715
return ;
3723
3716
}
3717
+ const task = animatingTask ;
3724
3718
stopAnimating ( lanes ) ;
3725
3719
// If an affected track isn't in the middle of rendering or committing, log from the previous
3726
3720
// finished render until the end of the animation.
@@ -3835,7 +3829,7 @@ function flushLayoutEffects(): void {
3835
3829
commitEndTime , // The start is the end of the first commit part.
3836
3830
commitStartTime , // The end is the start of the second commit part.
3837
3831
suspendedViewTransitionReason ,
3838
- workInProgressUpdateTask , // TODO: Use a ViewTransition Task and this is not safe to read in this phase.
3832
+ animatingTask ,
3839
3833
) ;
3840
3834
}
3841
3835
}
@@ -3938,7 +3932,7 @@ function flushSpawnedWork(): void {
3938
3932
startViewTransitionStartTime ,
3939
3933
commitEndTime ,
3940
3934
pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT ,
3941
- workInProgressUpdateTask , // TODO: Use a ViewTransition Task.
3935
+ animatingTask ,
3942
3936
) ;
3943
3937
if ( pendingDelayedCommitReason !== ABORTED_VIEW_TRANSITION_COMMIT ) {
3944
3938
pendingDelayedCommitReason = ANIMATION_STARTED_COMMIT ;
@@ -4440,11 +4434,7 @@ function flushPassiveEffectsImpl() {
4440
4434
passiveEffectStartTime = now ( ) ;
4441
4435
if ( pendingDelayedCommitReason === ANIMATION_STARTED_COMMIT ) {
4442
4436
// 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 ) ;
4448
4438
} else {
4449
4439
logPaintYieldPhase (
4450
4440
commitEndTime ,
0 commit comments