Skip to content

Commit a17fd6f

Browse files
committed
Two more
1 parent fa9feb4 commit a17fd6f

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

packages/react-reconciler/src/ReactFiberCommitEffects.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ import {getPublicInstance} from './ReactFiberConfig';
4646
import {
4747
captureCommitPhaseError,
4848
setIsRunningInsertionEffect,
49-
getExecutionContext,
50-
CommitContext,
5149
} from './ReactFiberWorkLoop';
5250
import {
5351
NoFlags as NoHookEffect,
@@ -917,7 +915,7 @@ export function commitProfilerUpdate(
917915
commitTime: number,
918916
effectDuration: number,
919917
) {
920-
if (enableProfilerTimer && getExecutionContext() & CommitContext) {
918+
if (enableProfilerTimer) {
921919
try {
922920
if (__DEV__) {
923921
runWithFiberInDEV(

packages/react-reconciler/src/ReactFiberCommitWork.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ import {
142142
addMarkerProgressCallbackToPendingTransition,
143143
addMarkerIncompleteCallbackToPendingTransition,
144144
addMarkerCompleteCallbackToPendingTransition,
145-
getExecutionContext,
146-
CommitContext,
147145
setIsRunningInsertionEffect,
148146
} from './ReactFiberWorkLoop';
149147
import {
@@ -2764,11 +2762,7 @@ function commitPassiveMountOnFiber(
27642762

27652763
// Only Profilers with work in their subtree will have a Passive effect scheduled.
27662764
if (flags & Passive) {
2767-
if (
2768-
enableProfilerTimer &&
2769-
enableProfilerCommitHooks &&
2770-
getExecutionContext() & CommitContext
2771-
) {
2765+
if (enableProfilerTimer && enableProfilerCommitHooks) {
27722766
const {passiveEffectDuration} = finishedWork.stateNode;
27732767

27742768
commitProfilerPostCommit(

0 commit comments

Comments
 (0)