From 1af924d03cc64c9ae3783d48e2d766ee612bbf54 Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Tue, 9 Apr 2024 14:28:34 -0400 Subject: [PATCH] Remove old field from internals --- packages/react/src/ReactSharedInternalsClient.js | 10 +--------- packages/react/src/ReactSharedInternalsServer.js | 10 ++-------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/packages/react/src/ReactSharedInternalsClient.js b/packages/react/src/ReactSharedInternalsClient.js index 5a6925b0fa..52adec8be4 100644 --- a/packages/react/src/ReactSharedInternalsClient.js +++ b/packages/react/src/ReactSharedInternalsClient.js @@ -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, @@ -51,10 +47,6 @@ const ReactSharedInternals: SharedStateClient = ({ T: null, }: any); -if (__DEV__ || !disableStringRefs) { - ReactSharedInternals.owner = null; -} - if (__DEV__) { ReactSharedInternals.actQueue = null; ReactSharedInternals.isBatchingLegacy = false; diff --git a/packages/react/src/ReactSharedInternalsServer.js b/packages/react/src/ReactSharedInternalsServer.js index 2f032bb212..4c63c75a0d 100644 --- a/packages/react/src/ReactSharedInternalsServer.js +++ b/packages/react/src/ReactSharedInternalsServer.js @@ -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, TaintRegistryPendingRequests: Set, - // 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) {