Skip to content

Commit

Permalink
cleanup enableProfilerNestedUpdateScheduledHook feature flag (#28509)
Browse files Browse the repository at this point in the history
## Summary

Looks like this was added years ago for instrumentation at meta that
never ended up rolling out. Should be safe to clean up.

## How did you test this change?
`yarn test`

DiffTrain build for [0d1ae5d](0d1ae5d)
  • Loading branch information
noahlemen committed Mar 11, 2024
1 parent 8506f82 commit eaaebdd
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 344 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
64f354cf27a17c4e5b0dfcd908e47940cf947771
0d1ae5d753044fae99bc37a7815aa947447de3f8
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,4 +633,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-classic-8c94b449";
exports.version = "18.3.0-www-classic-0d16943c";
45 changes: 2 additions & 43 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}

var ReactVersion = "18.3.0-www-classic-81c495cd";
var ReactVersion = "18.3.0-www-classic-db11990b";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down Expand Up @@ -194,8 +194,6 @@ if (__DEV__) {
var enableProfilerTimer = true;
var enableProfilerCommitHooks = true;
var enableProfilerNestedUpdatePhase = true;
var enableProfilerNestedUpdateScheduledHook =
dynamicFeatureFlags.enableProfilerNestedUpdateScheduledHook;
var enableAsyncActions = true; // Logs additional User Timing API marks for use with an experimental profiling tool.

var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler;
Expand Down Expand Up @@ -25344,10 +25342,7 @@ if (__DEV__) {
}
var hasUncaughtError = false;
var firstUncaughtError = null;
var legacyErrorBoundariesThatAlreadyFailed = null; // Only used when enableProfilerNestedUpdateScheduledHook is true;
// to track which root is currently committing layout effects.

var rootCommittingMutationOrLayoutEffects = null;
var legacyErrorBoundariesThatAlreadyFailed = null;
var rootDoesHavePassiveEffects = false;
var rootWithPendingPassiveEffects = null;
var pendingPassiveEffectsLanes = NoLanes;
Expand Down Expand Up @@ -25543,32 +25538,6 @@ if (__DEV__) {

warnIfUpdatesNotWrappedWithActDEV(fiber);

if (enableProfilerNestedUpdateScheduledHook) {
if (
(executionContext & CommitContext) !== NoContext &&
root === rootCommittingMutationOrLayoutEffects
) {
if (fiber.mode & ProfileMode) {
var current = fiber;

while (current !== null) {
if (current.tag === Profiler) {
var _current$memoizedProp = current.memoizedProps,
id = _current$memoizedProp.id,
onNestedUpdateScheduled =
_current$memoizedProp.onNestedUpdateScheduled;

if (typeof onNestedUpdateScheduled === "function") {
onNestedUpdateScheduled(id);
}
}

current = current.return;
}
}
}
}

if (enableTransitionTracing) {
var transition = ReactCurrentBatchConfig.transition;

Expand Down Expand Up @@ -27548,12 +27517,6 @@ if (__DEV__) {
// Mark the current commit time to be shared by all Profilers in this
// batch. This enables them to be grouped later.
recordCommitTime();
}

if (enableProfilerNestedUpdateScheduledHook) {
// Track the root here, rather than in commitLayoutEffects(), because of ref setters.
// Updates scheduled during ref detachment should also be flagged.
rootCommittingMutationOrLayoutEffects = root;
} // The next phase is the mutation phase, where we mutate the host tree.

commitMutationEffects(root, finishedWork, lanes);
Expand Down Expand Up @@ -27585,10 +27548,6 @@ if (__DEV__) {

if (enableSchedulingProfiler) {
markLayoutEffectsStopped();
}

if (enableProfilerNestedUpdateScheduledHook) {
rootCommittingMutationOrLayoutEffects = null;
} // Tell Scheduler to yield at the end of the frame, so the browser has an
// opportunity to paint.

Expand Down
45 changes: 2 additions & 43 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}

var ReactVersion = "18.3.0-www-modern-c4d09ac8";
var ReactVersion = "18.3.0-www-modern-d1dd2d63";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down Expand Up @@ -194,8 +194,6 @@ if (__DEV__) {
var enableProfilerTimer = true;
var enableProfilerCommitHooks = true;
var enableProfilerNestedUpdatePhase = true;
var enableProfilerNestedUpdateScheduledHook =
dynamicFeatureFlags.enableProfilerNestedUpdateScheduledHook;
var enableAsyncActions = true; // Logs additional User Timing API marks for use with an experimental profiling tool.

var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler;
Expand Down Expand Up @@ -25003,10 +25001,7 @@ if (__DEV__) {
}
var hasUncaughtError = false;
var firstUncaughtError = null;
var legacyErrorBoundariesThatAlreadyFailed = null; // Only used when enableProfilerNestedUpdateScheduledHook is true;
// to track which root is currently committing layout effects.

var rootCommittingMutationOrLayoutEffects = null;
var legacyErrorBoundariesThatAlreadyFailed = null;
var rootDoesHavePassiveEffects = false;
var rootWithPendingPassiveEffects = null;
var pendingPassiveEffectsLanes = NoLanes;
Expand Down Expand Up @@ -25202,32 +25197,6 @@ if (__DEV__) {

warnIfUpdatesNotWrappedWithActDEV(fiber);

if (enableProfilerNestedUpdateScheduledHook) {
if (
(executionContext & CommitContext) !== NoContext &&
root === rootCommittingMutationOrLayoutEffects
) {
if (fiber.mode & ProfileMode) {
var current = fiber;

while (current !== null) {
if (current.tag === Profiler) {
var _current$memoizedProp = current.memoizedProps,
id = _current$memoizedProp.id,
onNestedUpdateScheduled =
_current$memoizedProp.onNestedUpdateScheduled;

if (typeof onNestedUpdateScheduled === "function") {
onNestedUpdateScheduled(id);
}
}

current = current.return;
}
}
}
}

if (enableTransitionTracing) {
var transition = ReactCurrentBatchConfig.transition;

Expand Down Expand Up @@ -27198,12 +27167,6 @@ if (__DEV__) {
// Mark the current commit time to be shared by all Profilers in this
// batch. This enables them to be grouped later.
recordCommitTime();
}

if (enableProfilerNestedUpdateScheduledHook) {
// Track the root here, rather than in commitLayoutEffects(), because of ref setters.
// Updates scheduled during ref detachment should also be flagged.
rootCommittingMutationOrLayoutEffects = root;
} // The next phase is the mutation phase, where we mutate the host tree.

commitMutationEffects(root, finishedWork, lanes);
Expand Down Expand Up @@ -27235,10 +27198,6 @@ if (__DEV__) {

if (enableSchedulingProfiler) {
markLayoutEffectsStopped();
}

if (enableProfilerNestedUpdateScheduledHook) {
rootCommittingMutationOrLayoutEffects = null;
} // Tell Scheduler to yield at the end of the frame, so the browser has an
// opportunity to paint.

Expand Down
45 changes: 2 additions & 43 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ if (__DEV__) {
var enableProfilerTimer = true;
var enableProfilerCommitHooks = true;
var enableProfilerNestedUpdatePhase = true;
var enableProfilerNestedUpdateScheduledHook =
dynamicFeatureFlags.enableProfilerNestedUpdateScheduledHook;
var enableFormActions = true;
var enableAsyncActions = true; // Logs additional User Timing API marks for use with an experimental profiling tool.

Expand Down Expand Up @@ -31163,10 +31161,7 @@ if (__DEV__) {
}
var hasUncaughtError = false;
var firstUncaughtError = null;
var legacyErrorBoundariesThatAlreadyFailed = null; // Only used when enableProfilerNestedUpdateScheduledHook is true;
// to track which root is currently committing layout effects.

var rootCommittingMutationOrLayoutEffects = null;
var legacyErrorBoundariesThatAlreadyFailed = null;
var rootDoesHavePassiveEffects = false;
var rootWithPendingPassiveEffects = null;
var pendingPassiveEffectsLanes = NoLanes;
Expand Down Expand Up @@ -31362,32 +31357,6 @@ if (__DEV__) {

warnIfUpdatesNotWrappedWithActDEV(fiber);

if (enableProfilerNestedUpdateScheduledHook) {
if (
(executionContext & CommitContext) !== NoContext &&
root === rootCommittingMutationOrLayoutEffects
) {
if (fiber.mode & ProfileMode) {
var current = fiber;

while (current !== null) {
if (current.tag === Profiler) {
var _current$memoizedProp = current.memoizedProps,
id = _current$memoizedProp.id,
onNestedUpdateScheduled =
_current$memoizedProp.onNestedUpdateScheduled;

if (typeof onNestedUpdateScheduled === "function") {
onNestedUpdateScheduled(id);
}
}

current = current.return;
}
}
}
}

if (enableTransitionTracing) {
var transition = ReactCurrentBatchConfig$1.transition;

Expand Down Expand Up @@ -33429,12 +33398,6 @@ if (__DEV__) {
// Mark the current commit time to be shared by all Profilers in this
// batch. This enables them to be grouped later.
recordCommitTime();
}

if (enableProfilerNestedUpdateScheduledHook) {
// Track the root here, rather than in commitLayoutEffects(), because of ref setters.
// Updates scheduled during ref detachment should also be flagged.
rootCommittingMutationOrLayoutEffects = root;
} // The next phase is the mutation phase, where we mutate the host tree.

commitMutationEffects(root, finishedWork, lanes);
Expand Down Expand Up @@ -33474,10 +33437,6 @@ if (__DEV__) {

if (enableSchedulingProfiler) {
markLayoutEffectsStopped();
}

if (enableProfilerNestedUpdateScheduledHook) {
rootCommittingMutationOrLayoutEffects = null;
} // Tell Scheduler to yield at the end of the frame, so the browser has an
// opportunity to paint.

Expand Down Expand Up @@ -36034,7 +35993,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "18.3.0-www-classic-3e5b27d2";
var ReactVersion = "18.3.0-www-classic-26a9fc54";

function createPortal$1(
children,
Expand Down
45 changes: 2 additions & 43 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ if (__DEV__) {
var enableProfilerTimer = true;
var enableProfilerCommitHooks = true;
var enableProfilerNestedUpdatePhase = true;
var enableProfilerNestedUpdateScheduledHook =
dynamicFeatureFlags.enableProfilerNestedUpdateScheduledHook;
var enableFormActions = true;
var enableAsyncActions = true; // Logs additional User Timing API marks for use with an experimental profiling tool.

Expand Down Expand Up @@ -31019,10 +31017,7 @@ if (__DEV__) {
}
var hasUncaughtError = false;
var firstUncaughtError = null;
var legacyErrorBoundariesThatAlreadyFailed = null; // Only used when enableProfilerNestedUpdateScheduledHook is true;
// to track which root is currently committing layout effects.

var rootCommittingMutationOrLayoutEffects = null;
var legacyErrorBoundariesThatAlreadyFailed = null;
var rootDoesHavePassiveEffects = false;
var rootWithPendingPassiveEffects = null;
var pendingPassiveEffectsLanes = NoLanes;
Expand Down Expand Up @@ -31218,32 +31213,6 @@ if (__DEV__) {

warnIfUpdatesNotWrappedWithActDEV(fiber);

if (enableProfilerNestedUpdateScheduledHook) {
if (
(executionContext & CommitContext) !== NoContext &&
root === rootCommittingMutationOrLayoutEffects
) {
if (fiber.mode & ProfileMode) {
var current = fiber;

while (current !== null) {
if (current.tag === Profiler) {
var _current$memoizedProp = current.memoizedProps,
id = _current$memoizedProp.id,
onNestedUpdateScheduled =
_current$memoizedProp.onNestedUpdateScheduled;

if (typeof onNestedUpdateScheduled === "function") {
onNestedUpdateScheduled(id);
}
}

current = current.return;
}
}
}
}

if (enableTransitionTracing) {
var transition = ReactCurrentBatchConfig$1.transition;

Expand Down Expand Up @@ -33276,12 +33245,6 @@ if (__DEV__) {
// Mark the current commit time to be shared by all Profilers in this
// batch. This enables them to be grouped later.
recordCommitTime();
}

if (enableProfilerNestedUpdateScheduledHook) {
// Track the root here, rather than in commitLayoutEffects(), because of ref setters.
// Updates scheduled during ref detachment should also be flagged.
rootCommittingMutationOrLayoutEffects = root;
} // The next phase is the mutation phase, where we mutate the host tree.

commitMutationEffects(root, finishedWork, lanes);
Expand Down Expand Up @@ -33321,10 +33284,6 @@ if (__DEV__) {

if (enableSchedulingProfiler) {
markLayoutEffectsStopped();
}

if (enableProfilerNestedUpdateScheduledHook) {
rootCommittingMutationOrLayoutEffects = null;
} // Tell Scheduler to yield at the end of the frame, so the browser has an
// opportunity to paint.

Expand Down Expand Up @@ -35881,7 +35840,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "18.3.0-www-modern-b7723bc0";
var ReactVersion = "18.3.0-www-modern-9c67d6cd";

function createPortal$1(
children,
Expand Down
Loading

0 comments on commit eaaebdd

Please sign in to comment.