Skip to content

Commit 952b51a

Browse files
committed
Renamed context type flag
1 parent e776355 commit 952b51a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/react-reconciler/src/ReactDebugAsyncWarnings.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type {Fiber} from './ReactFiber';
1111

1212
import getComponentName from 'shared/getComponentName';
1313
import {getStackAddendumByWorkInProgressFiber} from 'shared/ReactFiberComponentTreeHook';
14-
import {AsyncUpdates, PreAsyncUpdates} from './ReactTypeOfInternalContext';
14+
import {AsyncUpdates, FutureCompatibilityChecks} from './ReactTypeOfInternalContext';
1515
import warning from 'fbjs/lib/warning';
1616

1717
type LIFECYCLE =
@@ -97,7 +97,7 @@ if (__DEV__) {
9797
while (fiber !== null) {
9898
if (
9999
fiber.internalContextTag & AsyncUpdates ||
100-
fiber.internalContextTag & PreAsyncUpdates
100+
fiber.internalContextTag & FutureCompatibilityChecks
101101
) {
102102
maybeAsyncRoot = fiber;
103103
}

packages/react-reconciler/src/ReactFiberClassComponent.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import invariant from 'fbjs/lib/invariant';
2626
import warning from 'fbjs/lib/warning';
2727

2828
import {startPhaseTimer, stopPhaseTimer} from './ReactDebugFiberPerf';
29-
import {AsyncUpdates, PreAsyncUpdates} from './ReactTypeOfInternalContext';
29+
import {AsyncUpdates, FutureCompatibilityChecks} from './ReactTypeOfInternalContext';
3030
import {
3131
cacheContext,
3232
getMaskedContext,
@@ -644,7 +644,7 @@ export default function(
644644
if (prototype.unstable_isAsyncReactComponent === true) {
645645
workInProgress.internalContextTag |= AsyncUpdates;
646646
} else if (prototype.unstable_isPreAsyncReactComponent === true) {
647-
workInProgress.internalContextTag |= PreAsyncUpdates;
647+
workInProgress.internalContextTag |= FutureCompatibilityChecks;
648648
}
649649
}
650650

@@ -653,7 +653,7 @@ export default function(
653653
// Warn about any unsafe lifecycles on this class component.
654654
if (
655655
workInProgress.internalContextTag & AsyncUpdates ||
656-
workInProgress.internalContextTag & PreAsyncUpdates
656+
workInProgress.internalContextTag & FutureCompatibilityChecks
657657
) {
658658
ReactDebugAsyncWarnings.recordLifecycleWarnings(
659659
workInProgress,

packages/react-reconciler/src/ReactTypeOfInternalContext.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ export type TypeOfInternalContext = number;
1111

1212
export const NoContext = 0b00000000;
1313
export const AsyncUpdates = 0b00000001;
14-
export const PreAsyncUpdates = 0b00000010;
14+
export const FutureCompatibilityChecks = 0b00000010;

0 commit comments

Comments
 (0)