@@ -108,9 +108,12 @@ import {
108108 resetComponentEffectTimers ,
109109 pushComponentEffectStart ,
110110 popComponentEffectStart ,
111+ pushComponentEffectErrors ,
112+ popComponentEffectErrors ,
111113 componentEffectStartTime ,
112114 componentEffectEndTime ,
113115 componentEffectDuration ,
116+ componentEffectErrors ,
114117} from './ReactProfilerTimer' ;
115118import {
116119 logComponentRender ,
@@ -396,7 +399,7 @@ function commitLayoutEffectOnFiber(
396399 committedLanes : Lanes ,
397400) : void {
398401 const prevEffectStart = pushComponentEffectStart ( ) ;
399-
402+ const prevEffectErrors = pushComponentEffectErrors ( ) ;
400403 // When updating this function, also update reappearLayoutEffects, which does
401404 // most of the same things when an offscreen tree goes from hidden -> visible.
402405 const flags = finishedWork . flags ;
@@ -632,10 +635,12 @@ function commitLayoutEffectOnFiber(
632635 componentEffectStartTime ,
633636 componentEffectEndTime ,
634637 componentEffectDuration ,
638+ componentEffectErrors ,
635639 ) ;
636640 }
637641
638642 popComponentEffectStart ( prevEffectStart ) ;
643+ popComponentEffectErrors ( prevEffectErrors ) ;
639644}
640645
641646function abortRootTransitions (
@@ -1628,7 +1633,7 @@ function commitMutationEffectsOnFiber(
16281633 lanes : Lanes ,
16291634) {
16301635 const prevEffectStart = pushComponentEffectStart ( ) ;
1631-
1636+ const prevEffectErrors = pushComponentEffectErrors ( ) ;
16321637 const current = finishedWork . alternate ;
16331638 const flags = finishedWork . flags ;
16341639
@@ -2137,10 +2142,12 @@ function commitMutationEffectsOnFiber(
21372142 componentEffectStartTime ,
21382143 componentEffectEndTime ,
21392144 componentEffectDuration ,
2145+ componentEffectErrors ,
21402146 ) ;
21412147 }
21422148
21432149 popComponentEffectStart ( prevEffectStart ) ;
2150+ popComponentEffectErrors ( prevEffectErrors ) ;
21442151}
21452152
21462153function commitReconciliationEffects ( finishedWork : Fiber ) {
@@ -2213,7 +2220,7 @@ function recursivelyTraverseLayoutEffects(
22132220
22142221export function disappearLayoutEffects ( finishedWork : Fiber ) {
22152222 const prevEffectStart = pushComponentEffectStart ( ) ;
2216-
2223+ const prevEffectErrors = pushComponentEffectErrors ( ) ;
22172224 switch ( finishedWork . tag ) {
22182225 case FunctionComponent :
22192226 case ForwardRef :
@@ -2286,10 +2293,12 @@ export function disappearLayoutEffects(finishedWork: Fiber) {
22862293 componentEffectStartTime ,
22872294 componentEffectEndTime ,
22882295 componentEffectDuration ,
2296+ componentEffectErrors ,
22892297 ) ;
22902298 }
22912299
22922300 popComponentEffectStart ( prevEffectStart ) ;
2301+ popComponentEffectErrors ( prevEffectErrors ) ;
22932302}
22942303
22952304function recursivelyTraverseDisappearLayoutEffects ( parentFiber : Fiber ) {
@@ -2311,7 +2320,7 @@ export function reappearLayoutEffects(
23112320 includeWorkInProgressEffects : boolean ,
23122321) {
23132322 const prevEffectStart = pushComponentEffectStart ( ) ;
2314-
2323+ const prevEffectErrors = pushComponentEffectErrors ( ) ;
23152324 // Turn on layout effects in a tree that previously disappeared.
23162325 const flags = finishedWork . flags ;
23172326 switch ( finishedWork . tag ) {
@@ -2462,10 +2471,12 @@ export function reappearLayoutEffects(
24622471 componentEffectStartTime ,
24632472 componentEffectEndTime ,
24642473 componentEffectDuration ,
2474+ componentEffectErrors ,
24652475 ) ;
24662476 }
24672477
24682478 popComponentEffectStart ( prevEffectStart ) ;
2479+ popComponentEffectErrors ( prevEffectErrors ) ;
24692480}
24702481
24712482function recursivelyTraverseReappearLayoutEffects (
@@ -2702,7 +2713,7 @@ function commitPassiveMountOnFiber(
27022713 endTime : number , // Profiling-only. The start time of the next Fiber or root completion.
27032714) : void {
27042715 const prevEffectStart = pushComponentEffectStart ( ) ;
2705-
2716+ const prevEffectErrors = pushComponentEffectErrors ( ) ;
27062717 // When updating this function, also update reconnectPassiveEffects, which does
27072718 // most of the same things when an offscreen tree goes from hidden -> visible,
27082719 // or when toggling effects inside a hidden tree.
@@ -3114,10 +3125,12 @@ function commitPassiveMountOnFiber(
31143125 componentEffectStartTime ,
31153126 componentEffectEndTime ,
31163127 componentEffectDuration ,
3128+ componentEffectErrors ,
31173129 ) ;
31183130 }
31193131
31203132 popComponentEffectStart ( prevEffectStart ) ;
3133+ popComponentEffectErrors ( prevEffectErrors ) ;
31213134}
31223135
31233136function recursivelyTraverseReconnectPassiveEffects (
@@ -3177,7 +3190,7 @@ export function reconnectPassiveEffects(
31773190 endTime : number , // Profiling-only. The start time of the next Fiber or root completion.
31783191) {
31793192 const prevEffectStart = pushComponentEffectStart ( ) ;
3180-
3193+ const prevEffectErrors = pushComponentEffectErrors ( ) ;
31813194 // If this component rendered in Profiling mode (DEV or in Profiler component) then log its
31823195 // render time. We do this after the fact in the passive effect to avoid the overhead of this
31833196 // getting in the way of the render characteristics and avoid the overhead of unwinding
@@ -3371,10 +3384,12 @@ export function reconnectPassiveEffects(
33713384 componentEffectStartTime ,
33723385 componentEffectEndTime ,
33733386 componentEffectDuration ,
3387+ componentEffectErrors ,
33743388 ) ;
33753389 }
33763390
33773391 popComponentEffectStart ( prevEffectStart ) ;
3392+ popComponentEffectErrors ( prevEffectErrors ) ;
33783393}
33793394
33803395function recursivelyTraverseAtomicPassiveEffects (
@@ -3651,7 +3666,7 @@ function recursivelyTraversePassiveUnmountEffects(parentFiber: Fiber): void {
36513666
36523667function commitPassiveUnmountOnFiber ( finishedWork : Fiber ) : void {
36533668 const prevEffectStart = pushComponentEffectStart ( ) ;
3654-
3669+ const prevEffectErrors = pushComponentEffectErrors ( ) ;
36553670 switch ( finishedWork . tag ) {
36563671 case FunctionComponent :
36573672 case ForwardRef :
@@ -3736,10 +3751,12 @@ function commitPassiveUnmountOnFiber(finishedWork: Fiber): void {
37363751 componentEffectStartTime ,
37373752 componentEffectEndTime ,
37383753 componentEffectDuration ,
3754+ componentEffectErrors ,
37393755 ) ;
37403756 }
37413757
37423758 popComponentEffectStart ( prevEffectStart ) ;
3759+ popComponentEffectErrors ( prevEffectErrors ) ;
37433760}
37443761
37453762function recursivelyTraverseDisconnectPassiveEffects ( parentFiber : Fiber ) : void {
@@ -3859,7 +3876,7 @@ function commitPassiveUnmountInsideDeletedTreeOnFiber(
38593876 nearestMountedAncestor : Fiber | null ,
38603877) : void {
38613878 const prevEffectStart = pushComponentEffectStart ( ) ;
3862-
3879+ const prevEffectErrors = pushComponentEffectErrors ( ) ;
38633880 switch ( current . tag ) {
38643881 case FunctionComponent :
38653882 case ForwardRef :
@@ -3986,10 +4003,12 @@ function commitPassiveUnmountInsideDeletedTreeOnFiber(
39864003 componentEffectStartTime ,
39874004 componentEffectEndTime ,
39884005 componentEffectDuration ,
4006+ componentEffectErrors ,
39894007 ) ;
39904008 }
39914009
39924010 popComponentEffectStart ( prevEffectStart ) ;
4011+ popComponentEffectErrors ( prevEffectErrors ) ;
39934012}
39944013
39954014export function invokeLayoutEffectMountInDEV ( fiber : Fiber ) : void {
0 commit comments