diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 532196212a427..7fd8d45cbbfdd 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -4f8ffec453c41fcb6e98cb4e003f7319bb1c81b9 +ee85098019bf9703b32f608f8bbd5f8fb1a7d60b diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index 532196212a427..7fd8d45cbbfdd 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -4f8ffec453c41fcb6e98cb4e003f7319bb1c81b9 +ee85098019bf9703b32f608f8bbd5f8fb1a7d60b diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 43636caa0e2a6..ad47dbd7ef00a 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-www-classic-4f8ffec45-20230115"; +var ReactVersion = "18.3.0-www-classic-ee8509801-20230117"; // ATTENTION // When adding new symbols to this file, diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index a5f6df61be0b0..5b328e2a1d6d9 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-www-modern-4f8ffec45-20230115"; +var ReactVersion = "18.3.0-www-modern-ee8509801-20230117"; // ATTENTION // When adding new symbols to this file, diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index 880e97c2f8b76..a7a50ed8769b5 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -643,4 +643,4 @@ exports.useSyncExternalStore = function( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-classic-4f8ffec45-20230115"; +exports.version = "18.3.0-www-classic-ee8509801-20230117"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 8d3b0a44176ec..e65035a6b1e6a 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -635,4 +635,4 @@ exports.useSyncExternalStore = function( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-modern-4f8ffec45-20230115"; +exports.version = "18.3.0-www-modern-ee8509801-20230117"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index f5b112780f321..76643f048c136 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -654,7 +654,7 @@ exports.useSyncExternalStore = function( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-classic-4f8ffec45-20230115"; +exports.version = "18.3.0-www-classic-ee8509801-20230117"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index d7b7f49035fa5..3f50cee95d517 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -646,7 +646,7 @@ exports.useSyncExternalStore = function( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-modern-4f8ffec45-20230115"; +exports.version = "18.3.0-www-modern-ee8509801-20230117"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 5fc0080f17ac2..42b30cb76b096 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -69,7 +69,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = "18.3.0-www-classic-4f8ffec45-20230115"; +var ReactVersion = "18.3.0-www-classic-ee8509801-20230117"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -20273,55 +20273,40 @@ function detachFiberAfterEffects(fiber) { if (alternate !== null) { fiber.alternate = null; detachFiberAfterEffects(alternate); - } // Note: Defensively using negation instead of < in case - // `deletedTreeCleanUpLevel` is undefined. + } // Clear cyclical Fiber fields. This level alone is designed to roughly + // approximate the planned Fiber refactor. In that world, `setState` will be + // bound to a special "instance" object instead of a Fiber. The Instance + // object will not have any of these fields. It will only be connected to + // the fiber tree via a single link at the root. So if this level alone is + // sufficient to fix memory issues, that bodes well for our plans. - { - // Clear cyclical Fiber fields. This level alone is designed to roughly - // approximate the planned Fiber refactor. In that world, `setState` will be - // bound to a special "instance" object instead of a Fiber. The Instance - // object will not have any of these fields. It will only be connected to - // the fiber tree via a single link at the root. So if this level alone is - // sufficient to fix memory issues, that bodes well for our plans. - fiber.child = null; - fiber.deletions = null; - fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host - // tree, which has its own pointers to children, parents, and siblings. - // The other host nodes also point back to fibers, so we should detach that - // one, too. + fiber.child = null; + fiber.deletions = null; + fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host + // tree, which has its own pointers to children, parents, and siblings. + // The other host nodes also point back to fibers, so we should detach that + // one, too. - if (fiber.tag === HostComponent) { - var hostInstance = fiber.stateNode; - } + if (fiber.tag === HostComponent) { + var hostInstance = fiber.stateNode; + } - fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We - // already disconnect the `return` pointer at the root of the deleted - // subtree (in `detachFiberMutation`). Besides, `return` by itself is not - // cyclical — it's only cyclical when combined with `child`, `sibling`, and - // `alternate`. But we'll clear it in the next level anyway, just in case. + fiber.stateNode = null; - { - fiber._debugOwner = null; - } + { + fiber._debugOwner = null; + } // Theoretically, nothing in here should be necessary, because we already + // disconnected the fiber from the tree. So even if something leaks this + // particular fiber, it won't leak anything else. - { - // Theoretically, nothing in here should be necessary, because we already - // disconnected the fiber from the tree. So even if something leaks this - // particular fiber, it won't leak anything else - // - // The purpose of this branch is to be super aggressive so we can measure - // if there's any difference in memory impact. If there is, that could - // indicate a React leak we don't know about. - fiber.return = null; - fiber.dependencies = null; - fiber.memoizedProps = null; - fiber.memoizedState = null; - fiber.pendingProps = null; - fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. + fiber.return = null; + fiber.dependencies = null; + fiber.memoizedProps = null; + fiber.memoizedState = null; + fiber.pendingProps = null; + fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. - fiber.updateQueue = null; - } - } + fiber.updateQueue = null; } function getHostParentFiber(fiber) { @@ -22398,33 +22383,31 @@ function commitPassiveUnmountEffects(finishedWork) { } function detachAlternateSiblings(parentFiber) { - { - // A fiber was deleted from this parent fiber, but it's still part of the - // previous (alternate) parent fiber's list of children. Because children - // are a linked list, an earlier sibling that's still alive will be - // connected to the deleted fiber via its `alternate`: - // - // live fiber --alternate--> previous live fiber --sibling--> deleted - // fiber - // - // We can't disconnect `alternate` on nodes that haven't been deleted yet, - // but we can disconnect the `sibling` and `child` pointers. - var previousFiber = parentFiber.alternate; + // A fiber was deleted from this parent fiber, but it's still part of the + // previous (alternate) parent fiber's list of children. Because children + // are a linked list, an earlier sibling that's still alive will be + // connected to the deleted fiber via its `alternate`: + // + // live fiber --alternate--> previous live fiber --sibling--> deleted + // fiber + // + // We can't disconnect `alternate` on nodes that haven't been deleted yet, + // but we can disconnect the `sibling` and `child` pointers. + var previousFiber = parentFiber.alternate; - if (previousFiber !== null) { - var detachedChild = previousFiber.child; + if (previousFiber !== null) { + var detachedChild = previousFiber.child; - if (detachedChild !== null) { - previousFiber.child = null; + if (detachedChild !== null) { + previousFiber.child = null; - do { - // $FlowFixMe[incompatible-use] found when upgrading Flow - var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow + do { + // $FlowFixMe[incompatible-use] found when upgrading Flow + var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow - detachedChild.sibling = null; - detachedChild = detachedSibling; - } while (detachedChild !== null); - } + detachedChild.sibling = null; + detachedChild = detachedSibling; + } while (detachedChild !== null); } } } @@ -22617,8 +22600,7 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( setCurrentFiber(fiber); commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor); resetCurrentFiber(); - var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we - // do this, still need to handle `deletedTreeCleanUpLevel` correctly.) + var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. if (child !== null) { child.return = fiber; @@ -22637,18 +22619,15 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_complete( while (nextEffect !== null) { var fiber = nextEffect; var sibling = fiber.sibling; - var returnFiber = fiber.return; + var returnFiber = fiber.return; // Recursively traverse the entire deleted tree and clean up fiber fields. + // This is more aggressive than ideal, and the long term goal is to only + // have to detach the deleted tree at the root. - { - // Recursively traverse the entire deleted tree and clean up fiber fields. - // This is more aggressive than ideal, and the long term goal is to only - // have to detach the deleted tree at the root. - detachFiberAfterEffects(fiber); + detachFiberAfterEffects(fiber); - if (fiber === deletedSubtreeRoot) { - nextEffect = null; - return; - } + if (fiber === deletedSubtreeRoot) { + nextEffect = null; + return; } if (sibling !== null) { diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 97d23d2bbf93a..1ee72ef78d0ca 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -69,7 +69,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = "18.3.0-www-modern-4f8ffec45-20230115"; +var ReactVersion = "18.3.0-www-modern-ee8509801-20230117"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -19962,55 +19962,40 @@ function detachFiberAfterEffects(fiber) { if (alternate !== null) { fiber.alternate = null; detachFiberAfterEffects(alternate); - } // Note: Defensively using negation instead of < in case - // `deletedTreeCleanUpLevel` is undefined. + } // Clear cyclical Fiber fields. This level alone is designed to roughly + // approximate the planned Fiber refactor. In that world, `setState` will be + // bound to a special "instance" object instead of a Fiber. The Instance + // object will not have any of these fields. It will only be connected to + // the fiber tree via a single link at the root. So if this level alone is + // sufficient to fix memory issues, that bodes well for our plans. - { - // Clear cyclical Fiber fields. This level alone is designed to roughly - // approximate the planned Fiber refactor. In that world, `setState` will be - // bound to a special "instance" object instead of a Fiber. The Instance - // object will not have any of these fields. It will only be connected to - // the fiber tree via a single link at the root. So if this level alone is - // sufficient to fix memory issues, that bodes well for our plans. - fiber.child = null; - fiber.deletions = null; - fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host - // tree, which has its own pointers to children, parents, and siblings. - // The other host nodes also point back to fibers, so we should detach that - // one, too. - - if (fiber.tag === HostComponent) { - var hostInstance = fiber.stateNode; - } - - fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We - // already disconnect the `return` pointer at the root of the deleted - // subtree (in `detachFiberMutation`). Besides, `return` by itself is not - // cyclical — it's only cyclical when combined with `child`, `sibling`, and - // `alternate`. But we'll clear it in the next level anyway, just in case. + fiber.child = null; + fiber.deletions = null; + fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host + // tree, which has its own pointers to children, parents, and siblings. + // The other host nodes also point back to fibers, so we should detach that + // one, too. - { - fiber._debugOwner = null; - } + if (fiber.tag === HostComponent) { + var hostInstance = fiber.stateNode; + } - { - // Theoretically, nothing in here should be necessary, because we already - // disconnected the fiber from the tree. So even if something leaks this - // particular fiber, it won't leak anything else - // - // The purpose of this branch is to be super aggressive so we can measure - // if there's any difference in memory impact. If there is, that could - // indicate a React leak we don't know about. - fiber.return = null; - fiber.dependencies = null; - fiber.memoizedProps = null; - fiber.memoizedState = null; - fiber.pendingProps = null; - fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. + fiber.stateNode = null; - fiber.updateQueue = null; - } - } + { + fiber._debugOwner = null; + } // Theoretically, nothing in here should be necessary, because we already + // disconnected the fiber from the tree. So even if something leaks this + // particular fiber, it won't leak anything else. + + fiber.return = null; + fiber.dependencies = null; + fiber.memoizedProps = null; + fiber.memoizedState = null; + fiber.pendingProps = null; + fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. + + fiber.updateQueue = null; } function getHostParentFiber(fiber) { @@ -22087,33 +22072,31 @@ function commitPassiveUnmountEffects(finishedWork) { } function detachAlternateSiblings(parentFiber) { - { - // A fiber was deleted from this parent fiber, but it's still part of the - // previous (alternate) parent fiber's list of children. Because children - // are a linked list, an earlier sibling that's still alive will be - // connected to the deleted fiber via its `alternate`: - // - // live fiber --alternate--> previous live fiber --sibling--> deleted - // fiber - // - // We can't disconnect `alternate` on nodes that haven't been deleted yet, - // but we can disconnect the `sibling` and `child` pointers. - var previousFiber = parentFiber.alternate; + // A fiber was deleted from this parent fiber, but it's still part of the + // previous (alternate) parent fiber's list of children. Because children + // are a linked list, an earlier sibling that's still alive will be + // connected to the deleted fiber via its `alternate`: + // + // live fiber --alternate--> previous live fiber --sibling--> deleted + // fiber + // + // We can't disconnect `alternate` on nodes that haven't been deleted yet, + // but we can disconnect the `sibling` and `child` pointers. + var previousFiber = parentFiber.alternate; - if (previousFiber !== null) { - var detachedChild = previousFiber.child; + if (previousFiber !== null) { + var detachedChild = previousFiber.child; - if (detachedChild !== null) { - previousFiber.child = null; + if (detachedChild !== null) { + previousFiber.child = null; - do { - // $FlowFixMe[incompatible-use] found when upgrading Flow - var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow + do { + // $FlowFixMe[incompatible-use] found when upgrading Flow + var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow - detachedChild.sibling = null; - detachedChild = detachedSibling; - } while (detachedChild !== null); - } + detachedChild.sibling = null; + detachedChild = detachedSibling; + } while (detachedChild !== null); } } } @@ -22306,8 +22289,7 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( setCurrentFiber(fiber); commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor); resetCurrentFiber(); - var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we - // do this, still need to handle `deletedTreeCleanUpLevel` correctly.) + var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. if (child !== null) { child.return = fiber; @@ -22326,18 +22308,15 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_complete( while (nextEffect !== null) { var fiber = nextEffect; var sibling = fiber.sibling; - var returnFiber = fiber.return; + var returnFiber = fiber.return; // Recursively traverse the entire deleted tree and clean up fiber fields. + // This is more aggressive than ideal, and the long term goal is to only + // have to detach the deleted tree at the root. - { - // Recursively traverse the entire deleted tree and clean up fiber fields. - // This is more aggressive than ideal, and the long term goal is to only - // have to detach the deleted tree at the root. - detachFiberAfterEffects(fiber); + detachFiberAfterEffects(fiber); - if (fiber === deletedSubtreeRoot) { - nextEffect = null; - return; - } + if (fiber === deletedSubtreeRoot) { + nextEffect = null; + return; } if (sibling !== null) { diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 5948f814cc5c8..e138fa284a4bf 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -9804,7 +9804,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "18.3.0-www-classic-4f8ffec45-20230115", + version: "18.3.0-www-classic-ee8509801-20230117", rendererPackageName: "react-art" }; var internals$jscomp$inline_1318 = { @@ -9835,7 +9835,7 @@ var internals$jscomp$inline_1318 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-4f8ffec45-20230115" + reconcilerVersion: "18.3.0-next-ee8509801-20230117" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1319 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 2123de2e6615e..3cc53c8e170a5 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -9471,7 +9471,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "18.3.0-www-modern-4f8ffec45-20230115", + version: "18.3.0-www-modern-ee8509801-20230117", rendererPackageName: "react-art" }; var internals$jscomp$inline_1309 = { @@ -9502,7 +9502,7 @@ var internals$jscomp$inline_1309 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-4f8ffec45-20230115" + reconcilerVersion: "18.3.0-next-ee8509801-20230117" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1310 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 882e5ba9e90f7..5e2caabe36ae2 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -34949,59 +34949,44 @@ function detachFiberAfterEffects(fiber) { if (alternate !== null) { fiber.alternate = null; detachFiberAfterEffects(alternate); - } // Note: Defensively using negation instead of < in case - // `deletedTreeCleanUpLevel` is undefined. + } // Clear cyclical Fiber fields. This level alone is designed to roughly + // approximate the planned Fiber refactor. In that world, `setState` will be + // bound to a special "instance" object instead of a Fiber. The Instance + // object will not have any of these fields. It will only be connected to + // the fiber tree via a single link at the root. So if this level alone is + // sufficient to fix memory issues, that bodes well for our plans. - { - // Clear cyclical Fiber fields. This level alone is designed to roughly - // approximate the planned Fiber refactor. In that world, `setState` will be - // bound to a special "instance" object instead of a Fiber. The Instance - // object will not have any of these fields. It will only be connected to - // the fiber tree via a single link at the root. So if this level alone is - // sufficient to fix memory issues, that bodes well for our plans. - fiber.child = null; - fiber.deletions = null; - fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host - // tree, which has its own pointers to children, parents, and siblings. - // The other host nodes also point back to fibers, so we should detach that - // one, too. + fiber.child = null; + fiber.deletions = null; + fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host + // tree, which has its own pointers to children, parents, and siblings. + // The other host nodes also point back to fibers, so we should detach that + // one, too. - if (fiber.tag === HostComponent) { - var hostInstance = fiber.stateNode; + if (fiber.tag === HostComponent) { + var hostInstance = fiber.stateNode; - if (hostInstance !== null) { - detachDeletedInstance(hostInstance); - } + if (hostInstance !== null) { + detachDeletedInstance(hostInstance); } + } - fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We - // already disconnect the `return` pointer at the root of the deleted - // subtree (in `detachFiberMutation`). Besides, `return` by itself is not - // cyclical — it's only cyclical when combined with `child`, `sibling`, and - // `alternate`. But we'll clear it in the next level anyway, just in case. + fiber.stateNode = null; - { - fiber._debugOwner = null; - } + { + fiber._debugOwner = null; + } // Theoretically, nothing in here should be necessary, because we already + // disconnected the fiber from the tree. So even if something leaks this + // particular fiber, it won't leak anything else. - { - // Theoretically, nothing in here should be necessary, because we already - // disconnected the fiber from the tree. So even if something leaks this - // particular fiber, it won't leak anything else - // - // The purpose of this branch is to be super aggressive so we can measure - // if there's any difference in memory impact. If there is, that could - // indicate a React leak we don't know about. - fiber.return = null; - fiber.dependencies = null; - fiber.memoizedProps = null; - fiber.memoizedState = null; - fiber.pendingProps = null; - fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. + fiber.return = null; + fiber.dependencies = null; + fiber.memoizedProps = null; + fiber.memoizedState = null; + fiber.pendingProps = null; + fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. - fiber.updateQueue = null; - } - } + fiber.updateQueue = null; } function getHostParentFiber(fiber) { @@ -37250,33 +37235,31 @@ function commitPassiveUnmountEffects(finishedWork) { } function detachAlternateSiblings(parentFiber) { - { - // A fiber was deleted from this parent fiber, but it's still part of the - // previous (alternate) parent fiber's list of children. Because children - // are a linked list, an earlier sibling that's still alive will be - // connected to the deleted fiber via its `alternate`: - // - // live fiber --alternate--> previous live fiber --sibling--> deleted - // fiber - // - // We can't disconnect `alternate` on nodes that haven't been deleted yet, - // but we can disconnect the `sibling` and `child` pointers. - var previousFiber = parentFiber.alternate; + // A fiber was deleted from this parent fiber, but it's still part of the + // previous (alternate) parent fiber's list of children. Because children + // are a linked list, an earlier sibling that's still alive will be + // connected to the deleted fiber via its `alternate`: + // + // live fiber --alternate--> previous live fiber --sibling--> deleted + // fiber + // + // We can't disconnect `alternate` on nodes that haven't been deleted yet, + // but we can disconnect the `sibling` and `child` pointers. + var previousFiber = parentFiber.alternate; - if (previousFiber !== null) { - var detachedChild = previousFiber.child; + if (previousFiber !== null) { + var detachedChild = previousFiber.child; - if (detachedChild !== null) { - previousFiber.child = null; + if (detachedChild !== null) { + previousFiber.child = null; - do { - // $FlowFixMe[incompatible-use] found when upgrading Flow - var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow + do { + // $FlowFixMe[incompatible-use] found when upgrading Flow + var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow - detachedChild.sibling = null; - detachedChild = detachedSibling; - } while (detachedChild !== null); - } + detachedChild.sibling = null; + detachedChild = detachedSibling; + } while (detachedChild !== null); } } } @@ -37469,8 +37452,7 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( setCurrentFiber(fiber); commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor); resetCurrentFiber(); - var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we - // do this, still need to handle `deletedTreeCleanUpLevel` correctly.) + var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. if (child !== null) { child.return = fiber; @@ -37489,18 +37471,15 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_complete( while (nextEffect !== null) { var fiber = nextEffect; var sibling = fiber.sibling; - var returnFiber = fiber.return; + var returnFiber = fiber.return; // Recursively traverse the entire deleted tree and clean up fiber fields. + // This is more aggressive than ideal, and the long term goal is to only + // have to detach the deleted tree at the root. - { - // Recursively traverse the entire deleted tree and clean up fiber fields. - // This is more aggressive than ideal, and the long term goal is to only - // have to detach the deleted tree at the root. - detachFiberAfterEffects(fiber); + detachFiberAfterEffects(fiber); - if (fiber === deletedSubtreeRoot) { - nextEffect = null; - return; - } + if (fiber === deletedSubtreeRoot) { + nextEffect = null; + return; } if (sibling !== null) { @@ -42667,7 +42646,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-4f8ffec45-20230115"; +var ReactVersion = "18.3.0-www-classic-ee8509801-20230117"; function createPortal( children, diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index 75bf733140d88..35e688b0e96be 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -34673,59 +34673,44 @@ function detachFiberAfterEffects(fiber) { if (alternate !== null) { fiber.alternate = null; detachFiberAfterEffects(alternate); - } // Note: Defensively using negation instead of < in case - // `deletedTreeCleanUpLevel` is undefined. + } // Clear cyclical Fiber fields. This level alone is designed to roughly + // approximate the planned Fiber refactor. In that world, `setState` will be + // bound to a special "instance" object instead of a Fiber. The Instance + // object will not have any of these fields. It will only be connected to + // the fiber tree via a single link at the root. So if this level alone is + // sufficient to fix memory issues, that bodes well for our plans. - { - // Clear cyclical Fiber fields. This level alone is designed to roughly - // approximate the planned Fiber refactor. In that world, `setState` will be - // bound to a special "instance" object instead of a Fiber. The Instance - // object will not have any of these fields. It will only be connected to - // the fiber tree via a single link at the root. So if this level alone is - // sufficient to fix memory issues, that bodes well for our plans. - fiber.child = null; - fiber.deletions = null; - fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host - // tree, which has its own pointers to children, parents, and siblings. - // The other host nodes also point back to fibers, so we should detach that - // one, too. + fiber.child = null; + fiber.deletions = null; + fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host + // tree, which has its own pointers to children, parents, and siblings. + // The other host nodes also point back to fibers, so we should detach that + // one, too. - if (fiber.tag === HostComponent) { - var hostInstance = fiber.stateNode; + if (fiber.tag === HostComponent) { + var hostInstance = fiber.stateNode; - if (hostInstance !== null) { - detachDeletedInstance(hostInstance); - } + if (hostInstance !== null) { + detachDeletedInstance(hostInstance); } + } - fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We - // already disconnect the `return` pointer at the root of the deleted - // subtree (in `detachFiberMutation`). Besides, `return` by itself is not - // cyclical — it's only cyclical when combined with `child`, `sibling`, and - // `alternate`. But we'll clear it in the next level anyway, just in case. + fiber.stateNode = null; - { - fiber._debugOwner = null; - } + { + fiber._debugOwner = null; + } // Theoretically, nothing in here should be necessary, because we already + // disconnected the fiber from the tree. So even if something leaks this + // particular fiber, it won't leak anything else. - { - // Theoretically, nothing in here should be necessary, because we already - // disconnected the fiber from the tree. So even if something leaks this - // particular fiber, it won't leak anything else - // - // The purpose of this branch is to be super aggressive so we can measure - // if there's any difference in memory impact. If there is, that could - // indicate a React leak we don't know about. - fiber.return = null; - fiber.dependencies = null; - fiber.memoizedProps = null; - fiber.memoizedState = null; - fiber.pendingProps = null; - fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. + fiber.return = null; + fiber.dependencies = null; + fiber.memoizedProps = null; + fiber.memoizedState = null; + fiber.pendingProps = null; + fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. - fiber.updateQueue = null; - } - } + fiber.updateQueue = null; } function getHostParentFiber(fiber) { @@ -36974,33 +36959,31 @@ function commitPassiveUnmountEffects(finishedWork) { } function detachAlternateSiblings(parentFiber) { - { - // A fiber was deleted from this parent fiber, but it's still part of the - // previous (alternate) parent fiber's list of children. Because children - // are a linked list, an earlier sibling that's still alive will be - // connected to the deleted fiber via its `alternate`: - // - // live fiber --alternate--> previous live fiber --sibling--> deleted - // fiber - // - // We can't disconnect `alternate` on nodes that haven't been deleted yet, - // but we can disconnect the `sibling` and `child` pointers. - var previousFiber = parentFiber.alternate; + // A fiber was deleted from this parent fiber, but it's still part of the + // previous (alternate) parent fiber's list of children. Because children + // are a linked list, an earlier sibling that's still alive will be + // connected to the deleted fiber via its `alternate`: + // + // live fiber --alternate--> previous live fiber --sibling--> deleted + // fiber + // + // We can't disconnect `alternate` on nodes that haven't been deleted yet, + // but we can disconnect the `sibling` and `child` pointers. + var previousFiber = parentFiber.alternate; - if (previousFiber !== null) { - var detachedChild = previousFiber.child; + if (previousFiber !== null) { + var detachedChild = previousFiber.child; - if (detachedChild !== null) { - previousFiber.child = null; + if (detachedChild !== null) { + previousFiber.child = null; - do { - // $FlowFixMe[incompatible-use] found when upgrading Flow - var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow + do { + // $FlowFixMe[incompatible-use] found when upgrading Flow + var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow - detachedChild.sibling = null; - detachedChild = detachedSibling; - } while (detachedChild !== null); - } + detachedChild.sibling = null; + detachedChild = detachedSibling; + } while (detachedChild !== null); } } } @@ -37193,8 +37176,7 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( setCurrentFiber(fiber); commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor); resetCurrentFiber(); - var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we - // do this, still need to handle `deletedTreeCleanUpLevel` correctly.) + var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. if (child !== null) { child.return = fiber; @@ -37213,18 +37195,15 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_complete( while (nextEffect !== null) { var fiber = nextEffect; var sibling = fiber.sibling; - var returnFiber = fiber.return; + var returnFiber = fiber.return; // Recursively traverse the entire deleted tree and clean up fiber fields. + // This is more aggressive than ideal, and the long term goal is to only + // have to detach the deleted tree at the root. - { - // Recursively traverse the entire deleted tree and clean up fiber fields. - // This is more aggressive than ideal, and the long term goal is to only - // have to detach the deleted tree at the root. - detachFiberAfterEffects(fiber); + detachFiberAfterEffects(fiber); - if (fiber === deletedSubtreeRoot) { - nextEffect = null; - return; - } + if (fiber === deletedSubtreeRoot) { + nextEffect = null; + return; } if (sibling !== null) { @@ -42391,7 +42370,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-4f8ffec45-20230115"; +var ReactVersion = "18.3.0-www-modern-ee8509801-20230117"; function createPortal( children, diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index 895efc82a541e..67a2ccd14f653 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -15529,7 +15529,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1750 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-4f8ffec45-20230115", + version: "18.3.0-www-classic-ee8509801-20230117", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2134 = { @@ -15559,7 +15559,7 @@ var internals$jscomp$inline_2134 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-4f8ffec45-20230115" + reconcilerVersion: "18.3.0-next-ee8509801-20230117" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2135 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -15801,4 +15801,4 @@ exports.unstable_renderSubtreeIntoContainer = function( ); }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-4f8ffec45-20230115"; +exports.version = "18.3.0-next-ee8509801-20230117"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 8b461661cd637..d751faac9446f 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -15090,7 +15090,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1718 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-4f8ffec45-20230115", + version: "18.3.0-www-modern-ee8509801-20230117", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2109 = { @@ -15121,7 +15121,7 @@ var internals$jscomp$inline_2109 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-4f8ffec45-20230115" + reconcilerVersion: "18.3.0-next-ee8509801-20230117" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2110 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -15309,4 +15309,4 @@ exports.unstable_flushControlled = function(fn) { } }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-4f8ffec45-20230115"; +exports.version = "18.3.0-next-ee8509801-20230117"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index a129287669c92..0197999374600 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -16299,7 +16299,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1824 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-4f8ffec45-20230115", + version: "18.3.0-www-classic-ee8509801-20230117", rendererPackageName: "react-dom" }; (function(internals) { @@ -16343,7 +16343,7 @@ var devToolsConfig$jscomp$inline_1824 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-4f8ffec45-20230115" + reconcilerVersion: "18.3.0-next-ee8509801-20230117" }); assign(Internals, { ReactBrowserEventEmitter: { @@ -16572,7 +16572,7 @@ exports.unstable_renderSubtreeIntoContainer = function( ); }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-4f8ffec45-20230115"; +exports.version = "18.3.0-next-ee8509801-20230117"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index d93ae46e1e454..a0f458e7fcf50 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -15850,7 +15850,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1792 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-4f8ffec45-20230115", + version: "18.3.0-www-modern-ee8509801-20230117", rendererPackageName: "react-dom" }; (function(internals) { @@ -15895,7 +15895,7 @@ var devToolsConfig$jscomp$inline_1792 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-4f8ffec45-20230115" + reconcilerVersion: "18.3.0-next-ee8509801-20230117" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; exports.createPortal = function(children, container) { @@ -16070,7 +16070,7 @@ exports.unstable_flushControlled = function(fn) { } }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-4f8ffec45-20230115"; +exports.version = "18.3.0-next-ee8509801-20230117"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index 7a8309e01c8f4..3dbab77c45dc7 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); -var ReactVersion = "18.3.0-www-classic-4f8ffec45-20230115"; +var ReactVersion = "18.3.0-www-classic-ee8509801-20230117"; // This refers to a WWW module. var warningWWW = require("warning"); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 7327fd479bad6..a8b78c124044d 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); -var ReactVersion = "18.3.0-www-modern-4f8ffec45-20230115"; +var ReactVersion = "18.3.0-www-modern-ee8509801-20230117"; // This refers to a WWW module. var warningWWW = require("warning"); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 84cdd7a51b413..5fd04b4dd9d4f 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -3633,4 +3633,4 @@ exports.renderToString = function(children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "18.3.0-www-classic-4f8ffec45-20230115"; +exports.version = "18.3.0-www-classic-ee8509801-20230117"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index c8715afe012a0..36a171050e7f8 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -3546,4 +3546,4 @@ exports.renderToString = function(children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "18.3.0-www-modern-4f8ffec45-20230115"; +exports.version = "18.3.0-www-modern-ee8509801-20230117"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index fc7390227a420..bfbc1e6172774 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -24174,59 +24174,44 @@ function detachFiberAfterEffects(fiber) { if (alternate !== null) { fiber.alternate = null; detachFiberAfterEffects(alternate); - } // Note: Defensively using negation instead of < in case - // `deletedTreeCleanUpLevel` is undefined. + } // Clear cyclical Fiber fields. This level alone is designed to roughly + // approximate the planned Fiber refactor. In that world, `setState` will be + // bound to a special "instance" object instead of a Fiber. The Instance + // object will not have any of these fields. It will only be connected to + // the fiber tree via a single link at the root. So if this level alone is + // sufficient to fix memory issues, that bodes well for our plans. - { - // Clear cyclical Fiber fields. This level alone is designed to roughly - // approximate the planned Fiber refactor. In that world, `setState` will be - // bound to a special "instance" object instead of a Fiber. The Instance - // object will not have any of these fields. It will only be connected to - // the fiber tree via a single link at the root. So if this level alone is - // sufficient to fix memory issues, that bodes well for our plans. - fiber.child = null; - fiber.deletions = null; - fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host - // tree, which has its own pointers to children, parents, and siblings. - // The other host nodes also point back to fibers, so we should detach that - // one, too. + fiber.child = null; + fiber.deletions = null; + fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host + // tree, which has its own pointers to children, parents, and siblings. + // The other host nodes also point back to fibers, so we should detach that + // one, too. - if (fiber.tag === HostComponent) { - var hostInstance = fiber.stateNode; + if (fiber.tag === HostComponent) { + var hostInstance = fiber.stateNode; - if (hostInstance !== null) { - detachDeletedInstance(hostInstance); - } + if (hostInstance !== null) { + detachDeletedInstance(hostInstance); } + } - fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We - // already disconnect the `return` pointer at the root of the deleted - // subtree (in `detachFiberMutation`). Besides, `return` by itself is not - // cyclical — it's only cyclical when combined with `child`, `sibling`, and - // `alternate`. But we'll clear it in the next level anyway, just in case. + fiber.stateNode = null; - { - fiber._debugOwner = null; - } + { + fiber._debugOwner = null; + } // Theoretically, nothing in here should be necessary, because we already + // disconnected the fiber from the tree. So even if something leaks this + // particular fiber, it won't leak anything else. - { - // Theoretically, nothing in here should be necessary, because we already - // disconnected the fiber from the tree. So even if something leaks this - // particular fiber, it won't leak anything else - // - // The purpose of this branch is to be super aggressive so we can measure - // if there's any difference in memory impact. If there is, that could - // indicate a React leak we don't know about. - fiber.return = null; - fiber.dependencies = null; - fiber.memoizedProps = null; - fiber.memoizedState = null; - fiber.pendingProps = null; - fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. + fiber.return = null; + fiber.dependencies = null; + fiber.memoizedProps = null; + fiber.memoizedState = null; + fiber.pendingProps = null; + fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. - fiber.updateQueue = null; - } - } + fiber.updateQueue = null; } function getHostParentFiber(fiber) { @@ -26226,33 +26211,31 @@ function commitPassiveUnmountEffects(finishedWork) { } function detachAlternateSiblings(parentFiber) { - { - // A fiber was deleted from this parent fiber, but it's still part of the - // previous (alternate) parent fiber's list of children. Because children - // are a linked list, an earlier sibling that's still alive will be - // connected to the deleted fiber via its `alternate`: - // - // live fiber --alternate--> previous live fiber --sibling--> deleted - // fiber - // - // We can't disconnect `alternate` on nodes that haven't been deleted yet, - // but we can disconnect the `sibling` and `child` pointers. - var previousFiber = parentFiber.alternate; + // A fiber was deleted from this parent fiber, but it's still part of the + // previous (alternate) parent fiber's list of children. Because children + // are a linked list, an earlier sibling that's still alive will be + // connected to the deleted fiber via its `alternate`: + // + // live fiber --alternate--> previous live fiber --sibling--> deleted + // fiber + // + // We can't disconnect `alternate` on nodes that haven't been deleted yet, + // but we can disconnect the `sibling` and `child` pointers. + var previousFiber = parentFiber.alternate; - if (previousFiber !== null) { - var detachedChild = previousFiber.child; + if (previousFiber !== null) { + var detachedChild = previousFiber.child; - if (detachedChild !== null) { - previousFiber.child = null; + if (detachedChild !== null) { + previousFiber.child = null; - do { - // $FlowFixMe[incompatible-use] found when upgrading Flow - var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow + do { + // $FlowFixMe[incompatible-use] found when upgrading Flow + var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow - detachedChild.sibling = null; - detachedChild = detachedSibling; - } while (detachedChild !== null); - } + detachedChild.sibling = null; + detachedChild = detachedSibling; + } while (detachedChild !== null); } } } @@ -26437,8 +26420,7 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( setCurrentFiber(fiber); commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor); resetCurrentFiber(); - var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we - // do this, still need to handle `deletedTreeCleanUpLevel` correctly.) + var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. if (child !== null) { child.return = fiber; @@ -26457,18 +26439,15 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_complete( while (nextEffect !== null) { var fiber = nextEffect; var sibling = fiber.sibling; - var returnFiber = fiber.return; + var returnFiber = fiber.return; // Recursively traverse the entire deleted tree and clean up fiber fields. + // This is more aggressive than ideal, and the long term goal is to only + // have to detach the deleted tree at the root. - { - // Recursively traverse the entire deleted tree and clean up fiber fields. - // This is more aggressive than ideal, and the long term goal is to only - // have to detach the deleted tree at the root. - detachFiberAfterEffects(fiber); + detachFiberAfterEffects(fiber); - if (fiber === deletedSubtreeRoot) { - nextEffect = null; - return; - } + if (fiber === deletedSubtreeRoot) { + nextEffect = null; + return; } if (sibling !== null) { @@ -31206,7 +31185,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-4f8ffec45-20230115"; +var ReactVersion = "18.3.0-www-classic-ee8509801-20230117"; function createPortal( children, diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index ccdce14e51a87..7d4333ecb733d 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -31487,59 +31487,44 @@ function detachFiberAfterEffects(fiber) { if (alternate !== null) { fiber.alternate = null; detachFiberAfterEffects(alternate); - } // Note: Defensively using negation instead of < in case - // `deletedTreeCleanUpLevel` is undefined. + } // Clear cyclical Fiber fields. This level alone is designed to roughly + // approximate the planned Fiber refactor. In that world, `setState` will be + // bound to a special "instance" object instead of a Fiber. The Instance + // object will not have any of these fields. It will only be connected to + // the fiber tree via a single link at the root. So if this level alone is + // sufficient to fix memory issues, that bodes well for our plans. - { - // Clear cyclical Fiber fields. This level alone is designed to roughly - // approximate the planned Fiber refactor. In that world, `setState` will be - // bound to a special "instance" object instead of a Fiber. The Instance - // object will not have any of these fields. It will only be connected to - // the fiber tree via a single link at the root. So if this level alone is - // sufficient to fix memory issues, that bodes well for our plans. - fiber.child = null; - fiber.deletions = null; - fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host - // tree, which has its own pointers to children, parents, and siblings. - // The other host nodes also point back to fibers, so we should detach that - // one, too. + fiber.child = null; + fiber.deletions = null; + fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host + // tree, which has its own pointers to children, parents, and siblings. + // The other host nodes also point back to fibers, so we should detach that + // one, too. - if (fiber.tag === HostComponent) { - var hostInstance = fiber.stateNode; + if (fiber.tag === HostComponent) { + var hostInstance = fiber.stateNode; - if (hostInstance !== null) { - detachDeletedInstance(hostInstance); - } + if (hostInstance !== null) { + detachDeletedInstance(hostInstance); } + } - fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We - // already disconnect the `return` pointer at the root of the deleted - // subtree (in `detachFiberMutation`). Besides, `return` by itself is not - // cyclical — it's only cyclical when combined with `child`, `sibling`, and - // `alternate`. But we'll clear it in the next level anyway, just in case. + fiber.stateNode = null; - { - fiber._debugOwner = null; - } + { + fiber._debugOwner = null; + } // Theoretically, nothing in here should be necessary, because we already + // disconnected the fiber from the tree. So even if something leaks this + // particular fiber, it won't leak anything else. - { - // Theoretically, nothing in here should be necessary, because we already - // disconnected the fiber from the tree. So even if something leaks this - // particular fiber, it won't leak anything else - // - // The purpose of this branch is to be super aggressive so we can measure - // if there's any difference in memory impact. If there is, that could - // indicate a React leak we don't know about. - fiber.return = null; - fiber.dependencies = null; - fiber.memoizedProps = null; - fiber.memoizedState = null; - fiber.pendingProps = null; - fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. + fiber.return = null; + fiber.dependencies = null; + fiber.memoizedProps = null; + fiber.memoizedState = null; + fiber.pendingProps = null; + fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. - fiber.updateQueue = null; - } - } + fiber.updateQueue = null; } function getHostParentFiber(fiber) { @@ -33539,33 +33524,31 @@ function commitPassiveUnmountEffects(finishedWork) { } function detachAlternateSiblings(parentFiber) { - { - // A fiber was deleted from this parent fiber, but it's still part of the - // previous (alternate) parent fiber's list of children. Because children - // are a linked list, an earlier sibling that's still alive will be - // connected to the deleted fiber via its `alternate`: - // - // live fiber --alternate--> previous live fiber --sibling--> deleted - // fiber - // - // We can't disconnect `alternate` on nodes that haven't been deleted yet, - // but we can disconnect the `sibling` and `child` pointers. - var previousFiber = parentFiber.alternate; + // A fiber was deleted from this parent fiber, but it's still part of the + // previous (alternate) parent fiber's list of children. Because children + // are a linked list, an earlier sibling that's still alive will be + // connected to the deleted fiber via its `alternate`: + // + // live fiber --alternate--> previous live fiber --sibling--> deleted + // fiber + // + // We can't disconnect `alternate` on nodes that haven't been deleted yet, + // but we can disconnect the `sibling` and `child` pointers. + var previousFiber = parentFiber.alternate; - if (previousFiber !== null) { - var detachedChild = previousFiber.child; + if (previousFiber !== null) { + var detachedChild = previousFiber.child; - if (detachedChild !== null) { - previousFiber.child = null; + if (detachedChild !== null) { + previousFiber.child = null; - do { - // $FlowFixMe[incompatible-use] found when upgrading Flow - var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow + do { + // $FlowFixMe[incompatible-use] found when upgrading Flow + var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow - detachedChild.sibling = null; - detachedChild = detachedSibling; - } while (detachedChild !== null); - } + detachedChild.sibling = null; + detachedChild = detachedSibling; + } while (detachedChild !== null); } } } @@ -33750,8 +33733,7 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( setCurrentFiber(fiber); commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor); resetCurrentFiber(); - var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we - // do this, still need to handle `deletedTreeCleanUpLevel` correctly.) + var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. if (child !== null) { child.return = fiber; @@ -33770,18 +33752,15 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_complete( while (nextEffect !== null) { var fiber = nextEffect; var sibling = fiber.sibling; - var returnFiber = fiber.return; + var returnFiber = fiber.return; // Recursively traverse the entire deleted tree and clean up fiber fields. + // This is more aggressive than ideal, and the long term goal is to only + // have to detach the deleted tree at the root. - { - // Recursively traverse the entire deleted tree and clean up fiber fields. - // This is more aggressive than ideal, and the long term goal is to only - // have to detach the deleted tree at the root. - detachFiberAfterEffects(fiber); + detachFiberAfterEffects(fiber); - if (fiber === deletedSubtreeRoot) { - nextEffect = null; - return; - } + if (fiber === deletedSubtreeRoot) { + nextEffect = null; + return; } if (sibling !== null) { @@ -38519,7 +38498,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-4f8ffec45-20230115"; +var ReactVersion = "18.3.0-www-modern-ee8509801-20230117"; function createPortal( children, diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index bba229f67b7d0..f9d38fa45803e 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -11328,7 +11328,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1518 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-4f8ffec45-20230115", + version: "18.3.0-www-classic-ee8509801-20230117", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2047 = { @@ -11358,7 +11358,7 @@ var internals$jscomp$inline_2047 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-4f8ffec45-20230115" + reconcilerVersion: "18.3.0-next-ee8509801-20230117" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2048 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -14847,4 +14847,4 @@ exports.unstable_renderSubtreeIntoContainer = function( ); }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-4f8ffec45-20230115"; +exports.version = "18.3.0-next-ee8509801-20230117"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index b7af986193232..67128a253e323 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -13967,7 +13967,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1673 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-4f8ffec45-20230115", + version: "18.3.0-www-modern-ee8509801-20230117", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2072 = { @@ -13998,7 +13998,7 @@ var internals$jscomp$inline_2072 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-4f8ffec45-20230115" + reconcilerVersion: "18.3.0-next-ee8509801-20230117" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2073 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -14321,4 +14321,4 @@ exports.unstable_flushControlled = function(fn) { } }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-4f8ffec45-20230115"; +exports.version = "18.3.0-next-ee8509801-20230117"; diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index 6bc81b1b9a604..eb53642c1922d 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -17450,55 +17450,40 @@ function detachFiberAfterEffects(fiber) { if (alternate !== null) { fiber.alternate = null; detachFiberAfterEffects(alternate); - } // Note: Defensively using negation instead of < in case - // `deletedTreeCleanUpLevel` is undefined. + } // Clear cyclical Fiber fields. This level alone is designed to roughly + // approximate the planned Fiber refactor. In that world, `setState` will be + // bound to a special "instance" object instead of a Fiber. The Instance + // object will not have any of these fields. It will only be connected to + // the fiber tree via a single link at the root. So if this level alone is + // sufficient to fix memory issues, that bodes well for our plans. - { - // Clear cyclical Fiber fields. This level alone is designed to roughly - // approximate the planned Fiber refactor. In that world, `setState` will be - // bound to a special "instance" object instead of a Fiber. The Instance - // object will not have any of these fields. It will only be connected to - // the fiber tree via a single link at the root. So if this level alone is - // sufficient to fix memory issues, that bodes well for our plans. - fiber.child = null; - fiber.deletions = null; - fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host - // tree, which has its own pointers to children, parents, and siblings. - // The other host nodes also point back to fibers, so we should detach that - // one, too. - - if (fiber.tag === HostComponent) { - var hostInstance = fiber.stateNode; - } - - fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We - // already disconnect the `return` pointer at the root of the deleted - // subtree (in `detachFiberMutation`). Besides, `return` by itself is not - // cyclical — it's only cyclical when combined with `child`, `sibling`, and - // `alternate`. But we'll clear it in the next level anyway, just in case. + fiber.child = null; + fiber.deletions = null; + fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host + // tree, which has its own pointers to children, parents, and siblings. + // The other host nodes also point back to fibers, so we should detach that + // one, too. - { - fiber._debugOwner = null; - } + if (fiber.tag === HostComponent) { + var hostInstance = fiber.stateNode; + } - { - // Theoretically, nothing in here should be necessary, because we already - // disconnected the fiber from the tree. So even if something leaks this - // particular fiber, it won't leak anything else - // - // The purpose of this branch is to be super aggressive so we can measure - // if there's any difference in memory impact. If there is, that could - // indicate a React leak we don't know about. - fiber.return = null; - fiber.dependencies = null; - fiber.memoizedProps = null; - fiber.memoizedState = null; - fiber.pendingProps = null; - fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. + fiber.stateNode = null; - fiber.updateQueue = null; - } - } + { + fiber._debugOwner = null; + } // Theoretically, nothing in here should be necessary, because we already + // disconnected the fiber from the tree. So even if something leaks this + // particular fiber, it won't leak anything else. + + fiber.return = null; + fiber.dependencies = null; + fiber.memoizedProps = null; + fiber.memoizedState = null; + fiber.pendingProps = null; + fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. + + fiber.updateQueue = null; } function getHostParentFiber(fiber) { @@ -19357,33 +19342,31 @@ function commitPassiveUnmountEffects(finishedWork) { } function detachAlternateSiblings(parentFiber) { - { - // A fiber was deleted from this parent fiber, but it's still part of the - // previous (alternate) parent fiber's list of children. Because children - // are a linked list, an earlier sibling that's still alive will be - // connected to the deleted fiber via its `alternate`: - // - // live fiber --alternate--> previous live fiber --sibling--> deleted - // fiber - // - // We can't disconnect `alternate` on nodes that haven't been deleted yet, - // but we can disconnect the `sibling` and `child` pointers. - var previousFiber = parentFiber.alternate; + // A fiber was deleted from this parent fiber, but it's still part of the + // previous (alternate) parent fiber's list of children. Because children + // are a linked list, an earlier sibling that's still alive will be + // connected to the deleted fiber via its `alternate`: + // + // live fiber --alternate--> previous live fiber --sibling--> deleted + // fiber + // + // We can't disconnect `alternate` on nodes that haven't been deleted yet, + // but we can disconnect the `sibling` and `child` pointers. + var previousFiber = parentFiber.alternate; - if (previousFiber !== null) { - var detachedChild = previousFiber.child; + if (previousFiber !== null) { + var detachedChild = previousFiber.child; - if (detachedChild !== null) { - previousFiber.child = null; + if (detachedChild !== null) { + previousFiber.child = null; - do { - // $FlowFixMe[incompatible-use] found when upgrading Flow - var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow + do { + // $FlowFixMe[incompatible-use] found when upgrading Flow + var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow - detachedChild.sibling = null; - detachedChild = detachedSibling; - } while (detachedChild !== null); - } + detachedChild.sibling = null; + detachedChild = detachedSibling; + } while (detachedChild !== null); } } } @@ -19576,8 +19559,7 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( setCurrentFiber(fiber); commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor); resetCurrentFiber(); - var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we - // do this, still need to handle `deletedTreeCleanUpLevel` correctly.) + var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. if (child !== null) { child.return = fiber; @@ -19596,18 +19578,15 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_complete( while (nextEffect !== null) { var fiber = nextEffect; var sibling = fiber.sibling; - var returnFiber = fiber.return; + var returnFiber = fiber.return; // Recursively traverse the entire deleted tree and clean up fiber fields. + // This is more aggressive than ideal, and the long term goal is to only + // have to detach the deleted tree at the root. - { - // Recursively traverse the entire deleted tree and clean up fiber fields. - // This is more aggressive than ideal, and the long term goal is to only - // have to detach the deleted tree at the root. - detachFiberAfterEffects(fiber); + detachFiberAfterEffects(fiber); - if (fiber === deletedSubtreeRoot) { - nextEffect = null; - return; - } + if (fiber === deletedSubtreeRoot) { + nextEffect = null; + return; } if (sibling !== null) { @@ -23903,7 +23882,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-4f8ffec45-20230115"; +var ReactVersion = "18.3.0-www-classic-ee8509801-20230117"; // Might add PROFILE later. diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index f52a88b81621f..0f3018faf2148 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -17450,55 +17450,40 @@ function detachFiberAfterEffects(fiber) { if (alternate !== null) { fiber.alternate = null; detachFiberAfterEffects(alternate); - } // Note: Defensively using negation instead of < in case - // `deletedTreeCleanUpLevel` is undefined. + } // Clear cyclical Fiber fields. This level alone is designed to roughly + // approximate the planned Fiber refactor. In that world, `setState` will be + // bound to a special "instance" object instead of a Fiber. The Instance + // object will not have any of these fields. It will only be connected to + // the fiber tree via a single link at the root. So if this level alone is + // sufficient to fix memory issues, that bodes well for our plans. - { - // Clear cyclical Fiber fields. This level alone is designed to roughly - // approximate the planned Fiber refactor. In that world, `setState` will be - // bound to a special "instance" object instead of a Fiber. The Instance - // object will not have any of these fields. It will only be connected to - // the fiber tree via a single link at the root. So if this level alone is - // sufficient to fix memory issues, that bodes well for our plans. - fiber.child = null; - fiber.deletions = null; - fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host - // tree, which has its own pointers to children, parents, and siblings. - // The other host nodes also point back to fibers, so we should detach that - // one, too. - - if (fiber.tag === HostComponent) { - var hostInstance = fiber.stateNode; - } - - fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We - // already disconnect the `return` pointer at the root of the deleted - // subtree (in `detachFiberMutation`). Besides, `return` by itself is not - // cyclical — it's only cyclical when combined with `child`, `sibling`, and - // `alternate`. But we'll clear it in the next level anyway, just in case. + fiber.child = null; + fiber.deletions = null; + fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host + // tree, which has its own pointers to children, parents, and siblings. + // The other host nodes also point back to fibers, so we should detach that + // one, too. - { - fiber._debugOwner = null; - } + if (fiber.tag === HostComponent) { + var hostInstance = fiber.stateNode; + } - { - // Theoretically, nothing in here should be necessary, because we already - // disconnected the fiber from the tree. So even if something leaks this - // particular fiber, it won't leak anything else - // - // The purpose of this branch is to be super aggressive so we can measure - // if there's any difference in memory impact. If there is, that could - // indicate a React leak we don't know about. - fiber.return = null; - fiber.dependencies = null; - fiber.memoizedProps = null; - fiber.memoizedState = null; - fiber.pendingProps = null; - fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. + fiber.stateNode = null; - fiber.updateQueue = null; - } - } + { + fiber._debugOwner = null; + } // Theoretically, nothing in here should be necessary, because we already + // disconnected the fiber from the tree. So even if something leaks this + // particular fiber, it won't leak anything else. + + fiber.return = null; + fiber.dependencies = null; + fiber.memoizedProps = null; + fiber.memoizedState = null; + fiber.pendingProps = null; + fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. + + fiber.updateQueue = null; } function getHostParentFiber(fiber) { @@ -19357,33 +19342,31 @@ function commitPassiveUnmountEffects(finishedWork) { } function detachAlternateSiblings(parentFiber) { - { - // A fiber was deleted from this parent fiber, but it's still part of the - // previous (alternate) parent fiber's list of children. Because children - // are a linked list, an earlier sibling that's still alive will be - // connected to the deleted fiber via its `alternate`: - // - // live fiber --alternate--> previous live fiber --sibling--> deleted - // fiber - // - // We can't disconnect `alternate` on nodes that haven't been deleted yet, - // but we can disconnect the `sibling` and `child` pointers. - var previousFiber = parentFiber.alternate; + // A fiber was deleted from this parent fiber, but it's still part of the + // previous (alternate) parent fiber's list of children. Because children + // are a linked list, an earlier sibling that's still alive will be + // connected to the deleted fiber via its `alternate`: + // + // live fiber --alternate--> previous live fiber --sibling--> deleted + // fiber + // + // We can't disconnect `alternate` on nodes that haven't been deleted yet, + // but we can disconnect the `sibling` and `child` pointers. + var previousFiber = parentFiber.alternate; - if (previousFiber !== null) { - var detachedChild = previousFiber.child; + if (previousFiber !== null) { + var detachedChild = previousFiber.child; - if (detachedChild !== null) { - previousFiber.child = null; + if (detachedChild !== null) { + previousFiber.child = null; - do { - // $FlowFixMe[incompatible-use] found when upgrading Flow - var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow + do { + // $FlowFixMe[incompatible-use] found when upgrading Flow + var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow - detachedChild.sibling = null; - detachedChild = detachedSibling; - } while (detachedChild !== null); - } + detachedChild.sibling = null; + detachedChild = detachedSibling; + } while (detachedChild !== null); } } } @@ -19576,8 +19559,7 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( setCurrentFiber(fiber); commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor); resetCurrentFiber(); - var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we - // do this, still need to handle `deletedTreeCleanUpLevel` correctly.) + var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. if (child !== null) { child.return = fiber; @@ -19596,18 +19578,15 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_complete( while (nextEffect !== null) { var fiber = nextEffect; var sibling = fiber.sibling; - var returnFiber = fiber.return; + var returnFiber = fiber.return; // Recursively traverse the entire deleted tree and clean up fiber fields. + // This is more aggressive than ideal, and the long term goal is to only + // have to detach the deleted tree at the root. - { - // Recursively traverse the entire deleted tree and clean up fiber fields. - // This is more aggressive than ideal, and the long term goal is to only - // have to detach the deleted tree at the root. - detachFiberAfterEffects(fiber); + detachFiberAfterEffects(fiber); - if (fiber === deletedSubtreeRoot) { - nextEffect = null; - return; - } + if (fiber === deletedSubtreeRoot) { + nextEffect = null; + return; } if (sibling !== null) { @@ -23903,7 +23882,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-4f8ffec45-20230115"; +var ReactVersion = "18.3.0-www-modern-ee8509801-20230117"; // Might add PROFILE later.