@@ -30,7 +30,6 @@ import {
30
30
enableProfilerTimer ,
31
31
enableProfilerCommitHooks ,
32
32
enableProfilerNestedUpdatePhase ,
33
- enableProfilerNestedUpdateScheduledHook ,
34
33
enableDebugTracing ,
35
34
enableSchedulingProfiler ,
36
35
disableSchedulerTimeoutInWorkLoop ,
@@ -107,7 +106,6 @@ import {
107
106
ForwardRef ,
108
107
MemoComponent ,
109
108
SimpleMemoComponent ,
110
- Profiler ,
111
109
HostComponent ,
112
110
HostHoistable ,
113
111
HostSingleton ,
@@ -581,10 +579,6 @@ let hasUncaughtError = false;
581
579
let firstUncaughtError = null ;
582
580
let legacyErrorBoundariesThatAlreadyFailed : Set < mixed > | null = null ;
583
581
584
- // Only used when enableProfilerNestedUpdateScheduledHook is true;
585
- // to track which root is currently committing layout effects.
586
- let rootCommittingMutationOrLayoutEffects : FiberRoot | null = null ;
587
-
588
582
let rootDoesHavePassiveEffects : boolean = false ;
589
583
let rootWithPendingPassiveEffects : FiberRoot | null = null ;
590
584
let pendingPassiveEffectsLanes : Lanes = NoLanes ;
@@ -807,26 +801,6 @@ export function scheduleUpdateOnFiber(
807
801
808
802
warnIfUpdatesNotWrappedWithActDEV ( fiber ) ;
809
803
810
- if ( enableProfilerTimer && enableProfilerNestedUpdateScheduledHook ) {
811
- if (
812
- ( executionContext & CommitContext ) !== NoContext &&
813
- root === rootCommittingMutationOrLayoutEffects
814
- ) {
815
- if ( fiber . mode & ProfileMode ) {
816
- let current : null | Fiber = fiber ;
817
- while ( current !== null ) {
818
- if ( current . tag === Profiler ) {
819
- const { id, onNestedUpdateScheduled} = current . memoizedProps ;
820
- if ( typeof onNestedUpdateScheduled === 'function' ) {
821
- onNestedUpdateScheduled ( id ) ;
822
- }
823
- }
824
- current = current . return ;
825
- }
826
- }
827
- }
828
- }
829
-
830
804
if ( enableTransitionTracing ) {
831
805
const transition = ReactCurrentBatchConfig . transition ;
832
806
if ( transition !== null && transition . name != null ) {
@@ -2938,12 +2912,6 @@ function commitRootImpl(
2938
2912
recordCommitTime ( ) ;
2939
2913
}
2940
2914
2941
- if ( enableProfilerTimer && enableProfilerNestedUpdateScheduledHook ) {
2942
- // Track the root here, rather than in commitLayoutEffects(), because of ref setters.
2943
- // Updates scheduled during ref detachment should also be flagged.
2944
- rootCommittingMutationOrLayoutEffects = root ;
2945
- }
2946
-
2947
2915
// The next phase is the mutation phase, where we mutate the host tree.
2948
2916
commitMutationEffects ( root , finishedWork , lanes ) ;
2949
2917
@@ -2982,10 +2950,6 @@ function commitRootImpl(
2982
2950
markLayoutEffectsStopped ( ) ;
2983
2951
}
2984
2952
2985
- if ( enableProfilerTimer && enableProfilerNestedUpdateScheduledHook ) {
2986
- rootCommittingMutationOrLayoutEffects = null ;
2987
- }
2988
-
2989
2953
// Tell Scheduler to yield at the end of the frame, so the browser has an
2990
2954
// opportunity to paint.
2991
2955
requestPaint ( ) ;
0 commit comments