Remove old field from internals

This commit is contained in:
Sebastian Markbage
2024-04-22 12:05:53 -04:00
committed by Rick Hanlon
parent ae602c3dcb
commit 1af924d03c
2 changed files with 3 additions and 17 deletions
@@ -10,17 +10,13 @@
import type {Dispatcher} from 'react-reconciler/src/ReactInternalTypes';
import type {AsyncDispatcher} from 'react-reconciler/src/ReactInternalTypes';
import type {BatchConfigTransition} from 'react-reconciler/src/ReactFiberTracingMarkerComponent';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import {disableStringRefs} from 'shared/ReactFeatureFlags';
export type SharedStateClient = {
H: null | Dispatcher, // ReactCurrentDispatcher for Hooks
A: null | AsyncDispatcher, // ReactCurrentCache for Cache
T: null | BatchConfigTransition, // ReactCurrentBatchConfig for Transitions
// DEV-only-ish
owner: null | Fiber, // ReactCurrentOwner is Fiber on the Client, null in Fizz. Flight uses SharedStateServer.
// DEV-only
// ReactCurrentActQueue
actQueue: null | Array<RendererTask>,
@@ -51,10 +47,6 @@ const ReactSharedInternals: SharedStateClient = ({
T: null,
}: any);
if (__DEV__ || !disableStringRefs) {
ReactSharedInternals.owner = null;
}
if (__DEV__) {
ReactSharedInternals.actQueue = null;
ReactSharedInternals.isBatchingLegacy = false;
@@ -9,7 +9,6 @@
import type {Dispatcher} from 'react-reconciler/src/ReactInternalTypes';
import type {AsyncDispatcher} from 'react-reconciler/src/ReactInternalTypes';
import type {ReactComponentInfo} from 'shared/ReactTypes';
import type {
Reference,
@@ -24,7 +23,7 @@ import {
TaintRegistryPendingRequests,
} from './ReactTaintRegistry';
import {disableStringRefs, enableTaint} from 'shared/ReactFeatureFlags';
import {enableTaint} from 'shared/ReactFeatureFlags';
export type SharedStateServer = {
H: null | Dispatcher, // ReactCurrentDispatcher for Hooks
@@ -36,8 +35,7 @@ export type SharedStateServer = {
TaintRegistryByteLengths: Set<number>,
TaintRegistryPendingRequests: Set<RequestCleanupQueue>,
// DEV-only-ish
owner: null | ReactComponentInfo, // ReactCurrentOwner is ReactComponentInfo in Flight, null in Fizz. Fiber/Fizz uses SharedStateClient.
// DEV-only
// ReactDebugCurrentFrame
setExtraStackFrame: (stack: null | string) => void,
@@ -60,10 +58,6 @@ if (enableTaint) {
TaintRegistryPendingRequests;
}
if (__DEV__ || !disableStringRefs) {
ReactSharedInternals.owner = null;
}
if (__DEV__) {
let currentExtraStackFrame = (null: null | string);
ReactSharedInternals.setExtraStackFrame = function (stack: null | string) {