Skip to content

Commit 97ae80f

Browse files
committed
Move traverseFragmentInstanceChildren to internal ReactFiberTreeReflection (#32613)
This is a nit but a Config should not have to know anything about the internals of Fibers. Ideally it shouldn't even access them but we have some cases where we need pointers back in like for this fragment. The way we've typically abstracted this is using the `ReactFiberTreeReflection` helper that's in the `react-reconciler`. Such as in the event system. https://github.com/facebook/react/blob/f3c956006a90dc68210bd3e19497d10fb9b028d3/packages/react-dom-bindings/src/events/ReactDOMEventListener.js#L22-L26 We sometimes cheat but we really should clean this up such that a `Fiber` is actually an opaque type to the Configs and it can never dot into it without using a helper. So this just moves `traverseFragmentInstanceChildren` to ReactFiberTreeReflection so that the ConfigDOM doesn't ever dot into its fields itself. It just passes the Fiber through back into the react-reconciler. I had to add a wrapper to read the `.child` to avoid that being assumed too. I also noticed that FragmentInstanceType is not actually passed through so that argument is unnecessary. DiffTrain build for [6b5d9fd](6b5d9fd)
1 parent 0241d22 commit 97ae80f

34 files changed

+226
-366
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2c560374d6276c51cfeeff7af39628058c155a13
1+
17d274dc127400b31379a1b26c5be53599c36aa5
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2c560374d6276c51cfeeff7af39628058c155a13
1+
17d274dc127400b31379a1b26c5be53599c36aa5

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ __DEV__ &&
15321532
exports.useTransition = function () {
15331533
return resolveDispatcher().useTransition();
15341534
};
1535-
exports.version = "19.1.0-www-classic-2c560374-20250314";
1535+
exports.version = "19.1.0-www-classic-6b5d9fd3-20250314";
15361536
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15371537
"function" ===
15381538
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ __DEV__ &&
15321532
exports.useTransition = function () {
15331533
return resolveDispatcher().useTransition();
15341534
};
1535-
exports.version = "19.1.0-www-modern-2c560374-20250314";
1535+
exports.version = "19.1.0-www-modern-6b5d9fd3-20250314";
15361536
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15371537
"function" ===
15381538
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,4 +641,4 @@ exports.useSyncExternalStore = function (
641641
exports.useTransition = function () {
642642
return ReactSharedInternals.H.useTransition();
643643
};
644-
exports.version = "19.1.0-www-classic-2c560374-20250314";
644+
exports.version = "19.1.0-www-classic-6b5d9fd3-20250314";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,4 +641,4 @@ exports.useSyncExternalStore = function (
641641
exports.useTransition = function () {
642642
return ReactSharedInternals.H.useTransition();
643643
};
644-
exports.version = "19.1.0-www-modern-2c560374-20250314";
644+
exports.version = "19.1.0-www-modern-6b5d9fd3-20250314";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ exports.useSyncExternalStore = function (
645645
exports.useTransition = function () {
646646
return ReactSharedInternals.H.useTransition();
647647
};
648-
exports.version = "19.1.0-www-classic-2c560374-20250314";
648+
exports.version = "19.1.0-www-classic-6b5d9fd3-20250314";
649649
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
650650
"function" ===
651651
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ exports.useSyncExternalStore = function (
645645
exports.useTransition = function () {
646646
return ReactSharedInternals.H.useTransition();
647647
};
648-
exports.version = "19.1.0-www-modern-2c560374-20250314";
648+
exports.version = "19.1.0-www-modern-6b5d9fd3-20250314";
649649
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
650650
"function" ===
651651
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18507,10 +18507,10 @@ __DEV__ &&
1850718507
(function () {
1850818508
var internals = {
1850918509
bundleType: 1,
18510-
version: "19.1.0-www-classic-2c560374-20250314",
18510+
version: "19.1.0-www-classic-6b5d9fd3-20250314",
1851118511
rendererPackageName: "react-art",
1851218512
currentDispatcherRef: ReactSharedInternals,
18513-
reconcilerVersion: "19.1.0-www-classic-2c560374-20250314"
18513+
reconcilerVersion: "19.1.0-www-classic-6b5d9fd3-20250314"
1851418514
};
1851518515
internals.overrideHookState = overrideHookState;
1851618516
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18544,7 +18544,7 @@ __DEV__ &&
1854418544
exports.Shape = Shape;
1854518545
exports.Surface = Surface;
1854618546
exports.Text = Text;
18547-
exports.version = "19.1.0-www-classic-2c560374-20250314";
18547+
exports.version = "19.1.0-www-classic-6b5d9fd3-20250314";
1854818548
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1854918549
"function" ===
1855018550
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18279,10 +18279,10 @@ __DEV__ &&
1827918279
(function () {
1828018280
var internals = {
1828118281
bundleType: 1,
18282-
version: "19.1.0-www-modern-2c560374-20250314",
18282+
version: "19.1.0-www-modern-6b5d9fd3-20250314",
1828318283
rendererPackageName: "react-art",
1828418284
currentDispatcherRef: ReactSharedInternals,
18285-
reconcilerVersion: "19.1.0-www-modern-2c560374-20250314"
18285+
reconcilerVersion: "19.1.0-www-modern-6b5d9fd3-20250314"
1828618286
};
1828718287
internals.overrideHookState = overrideHookState;
1828818288
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18316,7 +18316,7 @@ __DEV__ &&
1831618316
exports.Shape = Shape;
1831718317
exports.Surface = Surface;
1831818318
exports.Text = Text;
18319-
exports.version = "19.1.0-www-modern-2c560374-20250314";
18319+
exports.version = "19.1.0-www-modern-6b5d9fd3-20250314";
1832018320
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1832118321
"function" ===
1832218322
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)