Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove logic for multiple error recovery attempts #23227

Merged
merged 1 commit into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions packages/react-reconciler/src/ReactFiberWorkLoop.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,23 +894,7 @@ function recoverFromConcurrentError(root, errorRetryLanes) {
}
}

let exitStatus;

const MAX_ERROR_RETRY_ATTEMPTS = 50;
for (let i = 0; i < MAX_ERROR_RETRY_ATTEMPTS; i++) {
exitStatus = renderRootSync(root, errorRetryLanes);
if (
exitStatus === RootErrored &&
workInProgressRootRenderPhaseUpdatedLanes !== NoLanes
) {
// There was a render phase update during this render. Some internal React
// implementation details may use this as a trick to schedule another
// render pass. To protect against an inifinite loop, eventually
// we'll give up.
continue;
}
break;
}
const exitStatus = renderRootSync(root, errorRetryLanes);

executionContext = prevExecutionContext;

Expand Down
18 changes: 1 addition & 17 deletions packages/react-reconciler/src/ReactFiberWorkLoop.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,23 +894,7 @@ function recoverFromConcurrentError(root, errorRetryLanes) {
}
}

let exitStatus;

const MAX_ERROR_RETRY_ATTEMPTS = 50;
for (let i = 0; i < MAX_ERROR_RETRY_ATTEMPTS; i++) {
exitStatus = renderRootSync(root, errorRetryLanes);
if (
exitStatus === RootErrored &&
workInProgressRootRenderPhaseUpdatedLanes !== NoLanes
) {
// There was a render phase update during this render. Some internal React
// implementation details may use this as a trick to schedule another
// render pass. To protect against an inifinite loop, eventually
// we'll give up.
continue;
}
break;
}
const exitStatus = renderRootSync(root, errorRetryLanes);

executionContext = prevExecutionContext;

Expand Down