Skip to content

Commit cd4e5a4

Browse files
committed
Renamed context type flag
1 parent e776355 commit cd4e5a4

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

packages/react-reconciler/src/ReactDebugAsyncWarnings.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ 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 {
15+
AsyncUpdates,
16+
FutureCompatibilityChecks,
17+
} from './ReactTypeOfInternalContext';
1518
import warning from 'fbjs/lib/warning';
1619

1720
type LIFECYCLE =
@@ -97,7 +100,7 @@ if (__DEV__) {
97100
while (fiber !== null) {
98101
if (
99102
fiber.internalContextTag & AsyncUpdates ||
100-
fiber.internalContextTag & PreAsyncUpdates
103+
fiber.internalContextTag & FutureCompatibilityChecks
101104
) {
102105
maybeAsyncRoot = fiber;
103106
}

packages/react-reconciler/src/ReactFiberClassComponent.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ 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 {
30+
AsyncUpdates,
31+
FutureCompatibilityChecks,
32+
} from './ReactTypeOfInternalContext';
3033
import {
3134
cacheContext,
3235
getMaskedContext,
@@ -644,7 +647,7 @@ export default function(
644647
if (prototype.unstable_isAsyncReactComponent === true) {
645648
workInProgress.internalContextTag |= AsyncUpdates;
646649
} else if (prototype.unstable_isPreAsyncReactComponent === true) {
647-
workInProgress.internalContextTag |= PreAsyncUpdates;
650+
workInProgress.internalContextTag |= FutureCompatibilityChecks;
648651
}
649652
}
650653

@@ -653,7 +656,7 @@ export default function(
653656
// Warn about any unsafe lifecycles on this class component.
654657
if (
655658
workInProgress.internalContextTag & AsyncUpdates ||
656-
workInProgress.internalContextTag & PreAsyncUpdates
659+
workInProgress.internalContextTag & FutureCompatibilityChecks
657660
) {
658661
ReactDebugAsyncWarnings.recordLifecycleWarnings(
659662
workInProgress,

packages/react-reconciler/src/ReactTypeOfInternalContext.js

Lines changed: 1 addition & 1 deletion
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)