Skip to content

Commit 24abe60

Browse files
committed
Naming nits
queueRecoverableHydrationErrors -> upgradeHydrationErrorsToRecoverable
1 parent 61ef8f4 commit 24abe60

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ import {
131131
resetHydrationState,
132132
getIsHydrating,
133133
hasUnhydratedTailNodes,
134-
queueRecoverableHydrationErrors,
134+
upgradeHydrationErrorsToRecoverable,
135135
} from './ReactFiberHydrationContext.new';
136136
import {
137137
enableSuspenseCallback,
@@ -1105,7 +1105,7 @@ function completeWork(
11051105
// there may have been recoverable errors during first hydration
11061106
// attempt. If so, add them to a queue so we can log them in the
11071107
// commit phase.
1108-
queueRecoverableHydrationErrors();
1108+
upgradeHydrationErrorsToRecoverable();
11091109
}
11101110

11111111
if ((workInProgress.flags & DidCapture) !== NoFlags) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ import {
131131
resetHydrationState,
132132
getIsHydrating,
133133
hasUnhydratedTailNodes,
134-
queueRecoverableHydrationErrors,
134+
upgradeHydrationErrorsToRecoverable,
135135
} from './ReactFiberHydrationContext.old';
136136
import {
137137
enableSuspenseCallback,
@@ -1105,7 +1105,7 @@ function completeWork(
11051105
// there may have been recoverable errors during first hydration
11061106
// attempt. If so, add them to a queue so we can log them in the
11071107
// commit phase.
1108-
queueRecoverableHydrationErrors();
1108+
upgradeHydrationErrorsToRecoverable();
11091109
}
11101110

11111111
if ((workInProgress.flags & DidCapture) !== NoFlags) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ function resetHydrationState(): void {
607607
isHydrating = false;
608608
}
609609

610-
export function queueRecoverableHydrationErrors(): void {
610+
export function upgradeHydrationErrorsToRecoverable(): void {
611611
if (hydrationErrors !== null) {
612612
// Successfully completed a forced client render. The errors that occurred
613613
// during the hydration attempt are now recovered. We will log them in

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ function resetHydrationState(): void {
607607
isHydrating = false;
608608
}
609609

610-
export function queueRecoverableHydrationErrors(): void {
610+
export function upgradeHydrationErrorsToRecoverable(): void {
611611
if (hydrationErrors !== null) {
612612
// Successfully completed a forced client render. The errors that occurred
613613
// during the hydration attempt are now recovered. We will log them in

packages/react-server/src/ReactFizzServer.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ function popComponentStackInDEV(task: Task): void {
401401
}
402402
}
403403

404-
function reportError(request: Request, error: mixed): void {
404+
function logRecoverableError(request: Request, error: mixed): void {
405405
// If this callback errors, we intentionally let that error bubble up to become a fatal error
406406
// so that someone fixes the error reporting instead of hiding it.
407407
const onError = request.onError;
@@ -484,7 +484,7 @@ function renderSuspenseBoundary(
484484
}
485485
} catch (error) {
486486
contentRootSegment.status = ERRORED;
487-
reportError(request, error);
487+
logRecoverableError(request, error);
488488
newBoundary.forceClientRender = true;
489489
// We don't need to decrement any task numbers because we didn't spawn any new task.
490490
// We don't need to schedule any task because we know the parent has written yet.
@@ -1337,7 +1337,7 @@ function erroredTask(
13371337
error: mixed,
13381338
) {
13391339
// Report the error to a global handler.
1340-
reportError(request, error);
1340+
logRecoverableError(request, error);
13411341
if (boundary === null) {
13421342
fatalError(request, error);
13431343
} else {
@@ -1557,7 +1557,7 @@ export function performWork(request: Request): void {
15571557
flushCompletedQueues(request, request.destination);
15581558
}
15591559
} catch (error) {
1560-
reportError(request, error);
1560+
logRecoverableError(request, error);
15611561
fatalError(request, error);
15621562
} finally {
15631563
setCurrentResponseState(prevResponseState);
@@ -1945,7 +1945,7 @@ export function startFlowing(request: Request, destination: Destination): void {
19451945
try {
19461946
flushCompletedQueues(request, destination);
19471947
} catch (error) {
1948-
reportError(request, error);
1948+
logRecoverableError(request, error);
19491949
fatalError(request, error);
19501950
}
19511951
}
@@ -1960,7 +1960,7 @@ export function abort(request: Request): void {
19601960
flushCompletedQueues(request, request.destination);
19611961
}
19621962
} catch (error) {
1963-
reportError(request, error);
1963+
logRecoverableError(request, error);
19641964
fatalError(request, error);
19651965
}
19661966
}

packages/react-server/src/ReactFlightServer.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ export function resolveModelToJSON(
421421
x.then(ping, ping);
422422
return serializeByRefID(newSegment.id);
423423
} else {
424-
reportError(request, x);
424+
logRecoverableError(request, x);
425425
// Something errored. We'll still send everything we have up until this point.
426426
// We'll replace this element with a lazy reference that throws on the client
427427
// once it gets rendered.
@@ -604,7 +604,7 @@ export function resolveModelToJSON(
604604
);
605605
}
606606

607-
function reportError(request: Request, error: mixed): void {
607+
function logRecoverableError(request: Request, error: mixed): void {
608608
const onError = request.onError;
609609
onError(error);
610610
}
@@ -687,7 +687,7 @@ function retrySegment(request: Request, segment: Segment): void {
687687
x.then(ping, ping);
688688
return;
689689
} else {
690-
reportError(request, x);
690+
logRecoverableError(request, x);
691691
// This errored, we need to serialize this error to the
692692
emitErrorChunk(request, segment.id, x);
693693
}
@@ -711,7 +711,7 @@ function performWork(request: Request): void {
711711
flushCompletedChunks(request, request.destination);
712712
}
713713
} catch (error) {
714-
reportError(request, error);
714+
logRecoverableError(request, error);
715715
fatalError(request, error);
716716
} finally {
717717
ReactCurrentDispatcher.current = prevDispatcher;
@@ -794,7 +794,7 @@ export function startFlowing(request: Request, destination: Destination): void {
794794
try {
795795
flushCompletedChunks(request, destination);
796796
} catch (error) {
797-
reportError(request, error);
797+
logRecoverableError(request, error);
798798
fatalError(request, error);
799799
}
800800
}

0 commit comments

Comments
 (0)