Skip to content

Commit

Permalink
Two more
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Sep 16, 2024
1 parent fa9feb4 commit a17fd6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 1 addition & 3 deletions packages/react-reconciler/src/ReactFiberCommitEffects.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ import {getPublicInstance} from './ReactFiberConfig';
import {
captureCommitPhaseError,
setIsRunningInsertionEffect,
getExecutionContext,
CommitContext,
} from './ReactFiberWorkLoop';
import {
NoFlags as NoHookEffect,
Expand Down Expand Up @@ -917,7 +915,7 @@ export function commitProfilerUpdate(
commitTime: number,
effectDuration: number,
) {
if (enableProfilerTimer && getExecutionContext() & CommitContext) {
if (enableProfilerTimer) {
try {
if (__DEV__) {
runWithFiberInDEV(
Expand Down
8 changes: 1 addition & 7 deletions packages/react-reconciler/src/ReactFiberCommitWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ import {
addMarkerProgressCallbackToPendingTransition,
addMarkerIncompleteCallbackToPendingTransition,
addMarkerCompleteCallbackToPendingTransition,
getExecutionContext,
CommitContext,
setIsRunningInsertionEffect,
} from './ReactFiberWorkLoop';
import {
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit a17fd6f

Please sign in to comment.