Skip to content

Commit fa9feb4

Browse files
committed
Remove execution context check from shouldProfile
I don't know why this is here since all these callsites are within the CommitWork/CommitEffects helpers. Should help inline this.
1 parent ee1a403 commit fa9feb4

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

packages/react-reconciler/src/ReactFiberCommitEffects.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ import {
4848
setIsRunningInsertionEffect,
4949
getExecutionContext,
5050
CommitContext,
51-
NoContext,
5251
} from './ReactFiberWorkLoop';
5352
import {
5453
NoFlags as NoHookEffect,
@@ -81,8 +80,7 @@ function shouldProfile(current: Fiber): boolean {
8180
return (
8281
enableProfilerTimer &&
8382
enableProfilerCommitHooks &&
84-
(current.mode & ProfileMode) !== NoMode &&
85-
(getExecutionContext() & CommitContext) !== NoContext
83+
(current.mode & ProfileMode) !== NoMode
8684
);
8785
}
8886

packages/react-reconciler/src/ReactFiberCommitWork.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ import {
144144
addMarkerCompleteCallbackToPendingTransition,
145145
getExecutionContext,
146146
CommitContext,
147-
NoContext,
148147
setIsRunningInsertionEffect,
149148
} from './ReactFiberWorkLoop';
150149
import {
@@ -230,8 +229,7 @@ function shouldProfile(current: Fiber): boolean {
230229
return (
231230
enableProfilerTimer &&
232231
enableProfilerCommitHooks &&
233-
(current.mode & ProfileMode) !== NoMode &&
234-
(getExecutionContext() & CommitContext) !== NoContext
232+
(current.mode & ProfileMode) !== NoMode
235233
);
236234
}
237235

0 commit comments

Comments
 (0)