diff --git a/packages/react-art/src/ReactARTHostConfig.js b/packages/react-art/src/ReactARTHostConfig.js index 92417f77ae163..ec3af3d0c99ed 100644 --- a/packages/react-art/src/ReactARTHostConfig.js +++ b/packages/react-art/src/ReactARTHostConfig.js @@ -452,6 +452,6 @@ export function detachDeletedInstance(node: Instance): void { // noop } -export function logRecoverableError(error) { +export function reportError(error) { // noop } diff --git a/packages/react-dom/src/client/ReactDOMHostConfig.js b/packages/react-dom/src/client/ReactDOMHostConfig.js index 31cf689f6c548..4cfa2cd78b0a6 100644 --- a/packages/react-dom/src/client/ReactDOMHostConfig.js +++ b/packages/react-dom/src/client/ReactDOMHostConfig.js @@ -374,8 +374,7 @@ export function getCurrentEventPriority(): * { return getEventPriority(currentEvent.type); } -/* global reportError */ -export const logRecoverableError = +export const reportError = // $FlowFixMe Flow doesn't know about reportError typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event, diff --git a/packages/react-native-renderer/src/ReactFabricHostConfig.js b/packages/react-native-renderer/src/ReactFabricHostConfig.js index bec60bff22c99..389c2e05bbf40 100644 --- a/packages/react-native-renderer/src/ReactFabricHostConfig.js +++ b/packages/react-native-renderer/src/ReactFabricHostConfig.js @@ -526,6 +526,6 @@ export function detachDeletedInstance(node: Instance): void { // noop } -export function logRecoverableError(error: mixed): void { +export function reportError(error: mixed): void { // noop } diff --git a/packages/react-native-renderer/src/ReactNativeHostConfig.js b/packages/react-native-renderer/src/ReactNativeHostConfig.js index e1b1d25f5f60e..82a6265fed816 100644 --- a/packages/react-native-renderer/src/ReactNativeHostConfig.js +++ b/packages/react-native-renderer/src/ReactNativeHostConfig.js @@ -514,6 +514,6 @@ export function detachDeletedInstance(node: Instance): void { // noop } -export function logRecoverableError(error: mixed): void { +export function reportError(error: mixed): void { // noop } diff --git a/packages/react-noop-renderer/src/createReactNoop.js b/packages/react-noop-renderer/src/createReactNoop.js index 7e1ee5c57581b..be50b88b45186 100644 --- a/packages/react-noop-renderer/src/createReactNoop.js +++ b/packages/react-noop-renderer/src/createReactNoop.js @@ -467,7 +467,7 @@ function createReactNoop(reconciler: Function, useMutation: boolean) { detachDeletedInstance() {}, - logRecoverableError() { + reportError() { // no-op }, }; diff --git a/packages/react-reconciler/src/ReactFiberCompleteWork.new.js b/packages/react-reconciler/src/ReactFiberCompleteWork.new.js index de5b2309146a7..39f724c76df92 100644 --- a/packages/react-reconciler/src/ReactFiberCompleteWork.new.js +++ b/packages/react-reconciler/src/ReactFiberCompleteWork.new.js @@ -131,7 +131,7 @@ import { resetHydrationState, getIsHydrating, hasUnhydratedTailNodes, - queueRecoverableHydrationErrors, + upgradeHydrationErrorsToRecoverable, } from './ReactFiberHydrationContext.new'; import { enableSuspenseCallback, @@ -1105,7 +1105,7 @@ function completeWork( // there may have been recoverable errors during first hydration // attempt. If so, add them to a queue so we can log them in the // commit phase. - queueRecoverableHydrationErrors(); + upgradeHydrationErrorsToRecoverable(); } if ((workInProgress.flags & DidCapture) !== NoFlags) { diff --git a/packages/react-reconciler/src/ReactFiberCompleteWork.old.js b/packages/react-reconciler/src/ReactFiberCompleteWork.old.js index 025f65fa4eda0..c7baf36d16c47 100644 --- a/packages/react-reconciler/src/ReactFiberCompleteWork.old.js +++ b/packages/react-reconciler/src/ReactFiberCompleteWork.old.js @@ -131,7 +131,7 @@ import { resetHydrationState, getIsHydrating, hasUnhydratedTailNodes, - queueRecoverableHydrationErrors, + upgradeHydrationErrorsToRecoverable, } from './ReactFiberHydrationContext.old'; import { enableSuspenseCallback, @@ -1105,7 +1105,7 @@ function completeWork( // there may have been recoverable errors during first hydration // attempt. If so, add them to a queue so we can log them in the // commit phase. - queueRecoverableHydrationErrors(); + upgradeHydrationErrorsToRecoverable(); } if ((workInProgress.flags & DidCapture) !== NoFlags) { diff --git a/packages/react-reconciler/src/ReactFiberHydrationContext.new.js b/packages/react-reconciler/src/ReactFiberHydrationContext.new.js index 1eae8d58ec363..4a460d584a53d 100644 --- a/packages/react-reconciler/src/ReactFiberHydrationContext.new.js +++ b/packages/react-reconciler/src/ReactFiberHydrationContext.new.js @@ -607,7 +607,7 @@ function resetHydrationState(): void { isHydrating = false; } -export function queueRecoverableHydrationErrors(): void { +export function upgradeHydrationErrorsToRecoverable(): void { if (hydrationErrors !== null) { // Successfully completed a forced client render. The errors that occurred // during the hydration attempt are now recovered. We will log them in diff --git a/packages/react-reconciler/src/ReactFiberHydrationContext.old.js b/packages/react-reconciler/src/ReactFiberHydrationContext.old.js index e5583916fbbd7..3ee040237829a 100644 --- a/packages/react-reconciler/src/ReactFiberHydrationContext.old.js +++ b/packages/react-reconciler/src/ReactFiberHydrationContext.old.js @@ -607,7 +607,7 @@ function resetHydrationState(): void { isHydrating = false; } -export function queueRecoverableHydrationErrors(): void { +export function upgradeHydrationErrorsToRecoverable(): void { if (hydrationErrors !== null) { // Successfully completed a forced client render. The errors that occurred // during the hydration attempt are now recovered. We will log them in diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js index f3efac3e74d68..ec2cb593b28d6 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js @@ -77,7 +77,7 @@ import { supportsMicrotasks, errorHydratingContainer, scheduleMicrotask, - logRecoverableError, + reportError, } from './ReactFiberHostConfig'; import { @@ -2121,7 +2121,7 @@ function commitRootImpl( } else { // No user-provided onRecoverableError. Use the default behavior // provided by the renderer's host config. - logRecoverableError(recoverableError); + reportError(recoverableError); } } } diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js index d6e37f2785ff2..8ab9c6dddbe8b 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js @@ -77,7 +77,7 @@ import { supportsMicrotasks, errorHydratingContainer, scheduleMicrotask, - logRecoverableError, + reportError, } from './ReactFiberHostConfig'; import { @@ -2121,7 +2121,7 @@ function commitRootImpl( } else { // No user-provided onRecoverableError. Use the default behavior // provided by the renderer's host config. - logRecoverableError(recoverableError); + reportError(recoverableError); } } } diff --git a/packages/react-reconciler/src/forks/ReactFiberHostConfig.custom.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.custom.js index ff5bbf8035f07..43950ba0bd2d1 100644 --- a/packages/react-reconciler/src/forks/ReactFiberHostConfig.custom.js +++ b/packages/react-reconciler/src/forks/ReactFiberHostConfig.custom.js @@ -68,7 +68,7 @@ export const prepareScopeUpdate = $$$hostConfig.preparePortalMount; export const getInstanceFromScope = $$$hostConfig.getInstanceFromScope; export const getCurrentEventPriority = $$$hostConfig.getCurrentEventPriority; export const detachDeletedInstance = $$$hostConfig.detachDeletedInstance; -export const logRecoverableError = $$$hostConfig.logRecoverableError; +export const reportError = $$$hostConfig.reportError; // ------------------- // Microtasks diff --git a/packages/react-test-renderer/src/ReactTestHostConfig.js b/packages/react-test-renderer/src/ReactTestHostConfig.js index 840912db30886..fe4bfc80c581e 100644 --- a/packages/react-test-renderer/src/ReactTestHostConfig.js +++ b/packages/react-test-renderer/src/ReactTestHostConfig.js @@ -315,6 +315,6 @@ export function detachDeletedInstance(node: Instance): void { // noop } -export function logRecoverableError(error: mixed): void { +export function reportError(error: mixed): void { // noop }