Skip to content

Commit 8253cc0

Browse files
committed
Remove disableSchedulerTimeoutInWorkLoop flag
We found and mitigated the root cause of the regression that led us to temporarily revert this change. So now I'm un-reverting it.
1 parent 480626a commit 8253cc0

12 files changed

+2
-45
lines changed

packages/react-reconciler/src/ReactFiberWorkLoop.new.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ import {
3030
enableSchedulingProfiler,
3131
enableScopeAPI,
3232
skipUnmountedBoundaries,
33-
disableSchedulerTimeoutInWorkLoop,
34-
enableDoubleInvokingEffects,
3533
} from 'shared/ReactFeatureFlags';
3634
import ReactSharedInternals from 'shared/ReactSharedInternals';
3735
import invariant from 'shared/invariant';
@@ -745,7 +743,7 @@ function ensureRootIsScheduled(root: FiberRoot, currentTime: number) {
745743

746744
// This is the entry point for every concurrent task, i.e. anything that
747745
// goes through Scheduler.
748-
function performConcurrentWorkOnRoot(root, didTimeout) {
746+
function performConcurrentWorkOnRoot(root) {
749747
// Since we know we're in a React event, we can clear the current
750748
// event time. The next update will compute a new event time.
751749
currentEventTime = NoTimestamp;
@@ -785,18 +783,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
785783
return null;
786784
}
787785

788-
// TODO: We only check `didTimeout` defensively, to account for a Scheduler
789-
// bug we're still investigating. Once the bug in Scheduler is fixed,
790-
// we can remove this, since we track expiration ourselves.
791-
if (!disableSchedulerTimeoutInWorkLoop && didTimeout) {
792-
// Something expired. Flush synchronously until there's no expired
793-
// work left.
794-
markRootExpired(root, lanes);
795-
// This will schedule a synchronous callback.
796-
ensureRootIsScheduled(root, now());
797-
return null;
798-
}
799-
800786
let exitStatus = renderRootConcurrent(root, lanes);
801787

802788
if (

packages/react-reconciler/src/ReactFiberWorkLoop.old.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import {
3030
enableSchedulingProfiler,
3131
enableScopeAPI,
3232
skipUnmountedBoundaries,
33-
disableSchedulerTimeoutInWorkLoop,
3433
} from 'shared/ReactFeatureFlags';
3534
import ReactSharedInternals from 'shared/ReactSharedInternals';
3635
import invariant from 'shared/invariant';
@@ -739,7 +738,7 @@ function ensureRootIsScheduled(root: FiberRoot, currentTime: number) {
739738

740739
// This is the entry point for every concurrent task, i.e. anything that
741740
// goes through Scheduler.
742-
function performConcurrentWorkOnRoot(root, didTimeout) {
741+
function performConcurrentWorkOnRoot(root) {
743742
// Since we know we're in a React event, we can clear the current
744743
// event time. The next update will compute a new event time.
745744
currentEventTime = NoTimestamp;
@@ -779,18 +778,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
779778
return null;
780779
}
781780

782-
// TODO: We only check `didTimeout` defensively, to account for a Scheduler
783-
// bug we're still investigating. Once the bug in Scheduler is fixed,
784-
// we can remove this, since we track expiration ourselves.
785-
if (!disableSchedulerTimeoutInWorkLoop && didTimeout) {
786-
// Something expired. Flush synchronously until there's no expired
787-
// work left.
788-
markRootExpired(root, lanes);
789-
// This will schedule a synchronous callback.
790-
ensureRootIsScheduled(root, now());
791-
return null;
792-
}
793-
794781
let exitStatus = renderRootConcurrent(root, lanes);
795782

796783
if (

packages/shared/ReactFeatureFlags.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,3 @@ export const decoupleUpdatePriorityFromScheduler = false;
134134
export const enableDiscreteEventFlushingChange = false;
135135

136136
export const enableEagerRootListeners = true;
137-
138-
export const disableSchedulerTimeoutInWorkLoop = false;
139-
140-
export const enableDoubleInvokingEffects = false;

packages/shared/forks/ReactFeatureFlags.native-fb.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
5050
export const decoupleUpdatePriorityFromScheduler = false;
5151
export const enableDiscreteEventFlushingChange = false;
5252
export const enableEagerRootListeners = true;
53-
export const disableSchedulerTimeoutInWorkLoop = false;
5453

5554
export const enableDoubleInvokingEffects = false;
5655

packages/shared/forks/ReactFeatureFlags.native-oss.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
4949
export const decoupleUpdatePriorityFromScheduler = false;
5050
export const enableDiscreteEventFlushingChange = false;
5151
export const enableEagerRootListeners = true;
52-
export const disableSchedulerTimeoutInWorkLoop = false;
5352

5453
export const enableDoubleInvokingEffects = false;
5554

packages/shared/forks/ReactFeatureFlags.test-renderer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
4949
export const decoupleUpdatePriorityFromScheduler = false;
5050
export const enableDiscreteEventFlushingChange = false;
5151
export const enableEagerRootListeners = true;
52-
export const disableSchedulerTimeoutInWorkLoop = false;
5352

5453
export const enableDoubleInvokingEffects = false;
5554

packages/shared/forks/ReactFeatureFlags.test-renderer.native.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
4949
export const decoupleUpdatePriorityFromScheduler = false;
5050
export const enableDiscreteEventFlushingChange = false;
5151
export const enableEagerRootListeners = true;
52-
export const disableSchedulerTimeoutInWorkLoop = false;
5352

5453
export const enableDoubleInvokingEffects = false;
5554

packages/shared/forks/ReactFeatureFlags.test-renderer.www.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
4949
export const decoupleUpdatePriorityFromScheduler = false;
5050
export const enableDiscreteEventFlushingChange = false;
5151
export const enableEagerRootListeners = true;
52-
export const disableSchedulerTimeoutInWorkLoop = false;
5352

5453
export const enableDoubleInvokingEffects = false;
5554

packages/shared/forks/ReactFeatureFlags.testing.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
4949
export const decoupleUpdatePriorityFromScheduler = false;
5050
export const enableDiscreteEventFlushingChange = false;
5151
export const enableEagerRootListeners = true;
52-
export const disableSchedulerTimeoutInWorkLoop = false;
5352

5453
export const enableDoubleInvokingEffects = false;
5554

packages/shared/forks/ReactFeatureFlags.testing.www.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
4949
export const decoupleUpdatePriorityFromScheduler = false;
5050
export const enableDiscreteEventFlushingChange = true;
5151
export const enableEagerRootListeners = true;
52-
export const disableSchedulerTimeoutInWorkLoop = false;
5352

5453
export const enableDoubleInvokingEffects = false;
5554

packages/shared/forks/ReactFeatureFlags.www-dynamic.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,3 @@ export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
4747
// to __VARIANT__.
4848
export const enableTrustedTypesIntegration = false;
4949
export const disableSchedulerTimeoutBasedOnReactExpirationTime = false;
50-
export const disableSchedulerTimeoutInWorkLoop = __VARIANT__;
51-
52-
export const enableDoubleInvokingEffects = false;

packages/shared/forks/ReactFeatureFlags.www.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ export const {
2828
enableDebugTracing,
2929
skipUnmountedBoundaries,
3030
enableEagerRootListeners,
31-
disableSchedulerTimeoutInWorkLoop,
32-
enableDoubleInvokingEffects,
3331
} = dynamicFeatureFlags;
3432

3533
// On WWW, __EXPERIMENTAL__ is used for a new modern build.

0 commit comments

Comments
 (0)