From a17fd6fb617f561b78e148b9ad9b9f03f1d18a2a Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Mon, 16 Sep 2024 13:55:36 -0400 Subject: [PATCH] Two more --- packages/react-reconciler/src/ReactFiberCommitEffects.js | 4 +--- packages/react-reconciler/src/ReactFiberCommitWork.js | 8 +------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberCommitEffects.js b/packages/react-reconciler/src/ReactFiberCommitEffects.js index 1b9106d8d901e..dde2479ba8638 100644 --- a/packages/react-reconciler/src/ReactFiberCommitEffects.js +++ b/packages/react-reconciler/src/ReactFiberCommitEffects.js @@ -46,8 +46,6 @@ import {getPublicInstance} from './ReactFiberConfig'; import { captureCommitPhaseError, setIsRunningInsertionEffect, - getExecutionContext, - CommitContext, } from './ReactFiberWorkLoop'; import { NoFlags as NoHookEffect, @@ -917,7 +915,7 @@ export function commitProfilerUpdate( commitTime: number, effectDuration: number, ) { - if (enableProfilerTimer && getExecutionContext() & CommitContext) { + if (enableProfilerTimer) { try { if (__DEV__) { runWithFiberInDEV( diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.js b/packages/react-reconciler/src/ReactFiberCommitWork.js index c2b1fc55e9b7d..21c37d723a404 100644 --- a/packages/react-reconciler/src/ReactFiberCommitWork.js +++ b/packages/react-reconciler/src/ReactFiberCommitWork.js @@ -142,8 +142,6 @@ import { addMarkerProgressCallbackToPendingTransition, addMarkerIncompleteCallbackToPendingTransition, addMarkerCompleteCallbackToPendingTransition, - getExecutionContext, - CommitContext, setIsRunningInsertionEffect, } from './ReactFiberWorkLoop'; import { @@ -2764,11 +2762,7 @@ function commitPassiveMountOnFiber( // Only Profilers with work in their subtree will have a Passive effect scheduled. if (flags & Passive) { - if ( - enableProfilerTimer && - enableProfilerCommitHooks && - getExecutionContext() & CommitContext - ) { + if (enableProfilerTimer && enableProfilerCommitHooks) { const {passiveEffectDuration} = finishedWork.stateNode; commitProfilerPostCommit(