Skip to content

Commit 14211e5

Browse files
committed
Find-and-replace ReactDebugAsyncWarnings with ReactStrictModeWarnings
1 parent d6ea904 commit 14211e5

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

packages/react-reconciler/src/ReactFiberClassComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
enableAsyncSubtreeAPI,
1717
warnAboutDeprecatedLifecycles,
1818
} from 'shared/ReactFeatureFlags';
19-
import ReactDebugAsyncWarnings from './ReactDebugAsyncWarnings';
19+
import ReactStrictModeWarnings from './ReactStrictModeWarnings';
2020
import {isMounted} from 'react-reconciler/reflection';
2121
import * as ReactInstanceMap from 'shared/ReactInstanceMap';
2222
import emptyObject from 'fbjs/lib/emptyObject';
@@ -650,7 +650,7 @@ export default function(
650650

651651
if (__DEV__) {
652652
if (workInProgress.internalContextTag & StrictMode) {
653-
ReactDebugAsyncWarnings.recordLifecycleWarnings(
653+
ReactStrictModeWarnings.recordLifecycleWarnings(
654654
workInProgress,
655655
instance,
656656
);

packages/react-reconciler/src/ReactFiberScheduler.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type {ExpirationTime} from './ReactFiberExpirationTime';
1616
import {getStackAddendumByWorkInProgressFiber} from 'shared/ReactFiberComponentTreeHook';
1717
import ReactErrorUtils from 'shared/ReactErrorUtils';
1818
import {ReactCurrentOwner} from 'shared/ReactGlobalSharedState';
19-
import ReactDebugAsyncWarnings from './ReactDebugAsyncWarnings';
19+
import ReactStrictModeWarnings from './ReactStrictModeWarnings';
2020
import {
2121
PerformedWork,
2222
Placement,
@@ -312,7 +312,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
312312

313313
function commitAllLifeCycles() {
314314
if (__DEV__) {
315-
ReactDebugAsyncWarnings.flushPendingAsyncWarnings();
315+
ReactStrictModeWarnings.flushPendingAsyncWarnings();
316316
}
317317

318318
while (nextEffect !== null) {
@@ -657,7 +657,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
657657

658658
function performFailedUnitOfWork(workInProgress: Fiber): Fiber | null {
659659
if (__DEV__) {
660-
ReactDebugAsyncWarnings.discardPendingWarnings();
660+
ReactStrictModeWarnings.discardPendingWarnings();
661661
}
662662

663663
// The current, flushed, state of this fiber is the alternate.

packages/react-reconciler/src/ReactStrictModeWarnings.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type LIFECYCLE =
2121
type LifecycleToComponentsMap = {[lifecycle: LIFECYCLE]: Array<Fiber>};
2222
type FiberToLifecycleMap = Map<Fiber, LifecycleToComponentsMap>;
2323

24-
const ReactDebugAsyncWarnings = {
24+
const ReactStrictModeWarnings = {
2525
discardPendingWarnings(): void {},
2626
flushPendingAsyncWarnings(): void {},
2727
recordLifecycleWarnings(fiber: Fiber, instance: any): void {},
@@ -39,11 +39,11 @@ if (__DEV__) {
3939
// Tracks components we have already warned about.
4040
const didWarnSet = new Set();
4141

42-
ReactDebugAsyncWarnings.discardPendingWarnings = () => {
42+
ReactStrictModeWarnings.discardPendingWarnings = () => {
4343
pendingWarningsMap = new Map();
4444
};
4545

46-
ReactDebugAsyncWarnings.flushPendingAsyncWarnings = () => {
46+
ReactStrictModeWarnings.flushPendingAsyncWarnings = () => {
4747
((pendingWarningsMap: any): FiberToLifecycleMap).forEach(
4848
(lifecycleWarningsMap, strictRoot) => {
4949
const lifecyclesWarningMesages = [];
@@ -105,7 +105,7 @@ if (__DEV__) {
105105
return maybeStrictRoot;
106106
};
107107

108-
ReactDebugAsyncWarnings.recordLifecycleWarnings = (
108+
ReactStrictModeWarnings.recordLifecycleWarnings = (
109109
fiber: Fiber,
110110
instance: any,
111111
) => {
@@ -163,4 +163,4 @@ if (__DEV__) {
163163
};
164164
}
165165

166-
export default ReactDebugAsyncWarnings;
166+
export default ReactStrictModeWarnings;

0 commit comments

Comments
 (0)