File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,6 @@ import {getPublicInstance} from './ReactFiberConfig';
4646import {
4747 captureCommitPhaseError ,
4848 setIsRunningInsertionEffect ,
49- getExecutionContext ,
50- CommitContext ,
51- NoContext ,
5249} from './ReactFiberWorkLoop' ;
5350import {
5451 NoFlags as NoHookEffect ,
@@ -81,8 +78,7 @@ function shouldProfile(current: Fiber): boolean {
8178 return (
8279 enableProfilerTimer &&
8380 enableProfilerCommitHooks &&
84- ( current . mode & ProfileMode ) !== NoMode &&
85- ( getExecutionContext ( ) & CommitContext ) !== NoContext
81+ ( current . mode & ProfileMode ) !== NoMode
8682 ) ;
8783}
8884
@@ -919,7 +915,7 @@ export function commitProfilerUpdate(
919915 commitTime : number ,
920916 effectDuration : number ,
921917) {
922- if ( enableProfilerTimer && getExecutionContext ( ) & CommitContext ) {
918+ if ( enableProfilerTimer ) {
923919 try {
924920 if ( __DEV__ ) {
925921 runWithFiberInDEV (
Original file line number Diff line number Diff line change @@ -145,9 +145,6 @@ import {
145145 addMarkerProgressCallbackToPendingTransition ,
146146 addMarkerIncompleteCallbackToPendingTransition ,
147147 addMarkerCompleteCallbackToPendingTransition ,
148- getExecutionContext ,
149- CommitContext ,
150- NoContext ,
151148 setIsRunningInsertionEffect ,
152149} from './ReactFiberWorkLoop' ;
153150import {
@@ -233,8 +230,7 @@ function shouldProfile(current: Fiber): boolean {
233230 return (
234231 enableProfilerTimer &&
235232 enableProfilerCommitHooks &&
236- ( current . mode & ProfileMode ) !== NoMode &&
237- ( getExecutionContext ( ) & CommitContext ) !== NoContext
233+ ( current . mode & ProfileMode ) !== NoMode
238234 ) ;
239235}
240236
@@ -2817,11 +2813,7 @@ function commitPassiveMountOnFiber(
28172813
28182814 // Only Profilers with work in their subtree will have a Passive effect scheduled.
28192815 if ( flags & Passive ) {
2820- if (
2821- enableProfilerTimer &&
2822- enableProfilerCommitHooks &&
2823- getExecutionContext ( ) & CommitContext
2824- ) {
2816+ if ( enableProfilerTimer && enableProfilerCommitHooks ) {
28252817 const { passiveEffectDuration} = finishedWork . stateNode ;
28262818
28272819 commitProfilerPostCommit (
You can’t perform that action at this time.
0 commit comments