diff --git a/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index 45ceec34b6a481..9593291b531ac9 100644 --- a/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -6901,7 +6901,11 @@ function scheduleFibersWithFamiliesRecursively( if (staleFamilies.has(family)) { needsRemount = true; } else if (updatedFamilies.has(family)) { - needsRender = true; + if (tag === ClassComponent) { + needsRemount = true; + } else { + needsRender = true; + } } } } @@ -17865,6 +17869,7 @@ function commitNestedUnmounts(root, renderPriorityLevel) { } function detachFiber(current$$1) { + var alternate = current$$1.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we // should clear the child pointer of the parent alternate to let this // get GC:ed but we don't know which for sure which parent is the current @@ -17875,13 +17880,13 @@ function detachFiber(current$$1) { current$$1.memoizedState = null; current$$1.updateQueue = null; current$$1.dependencies = null; - var alternate = current$$1.alternate; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; if (alternate !== null) { - alternate.return = null; - alternate.child = null; - alternate.memoizedState = null; - alternate.updateQueue = null; - alternate.dependencies = null; + detachFiber(alternate); } } diff --git a/Libraries/Renderer/implementations/ReactFabric-dev.js b/Libraries/Renderer/implementations/ReactFabric-dev.js index 2b189740eebd84..dfad8aae4a09d3 100644 --- a/Libraries/Renderer/implementations/ReactFabric-dev.js +++ b/Libraries/Renderer/implementations/ReactFabric-dev.js @@ -6897,7 +6897,11 @@ function scheduleFibersWithFamiliesRecursively( if (staleFamilies.has(family)) { needsRemount = true; } else if (updatedFamilies.has(family)) { - needsRender = true; + if (tag === ClassComponent) { + needsRemount = true; + } else { + needsRender = true; + } } } } @@ -17861,6 +17865,7 @@ function commitNestedUnmounts(root, renderPriorityLevel) { } function detachFiber(current$$1) { + var alternate = current$$1.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we // should clear the child pointer of the parent alternate to let this // get GC:ed but we don't know which for sure which parent is the current @@ -17871,13 +17876,13 @@ function detachFiber(current$$1) { current$$1.memoizedState = null; current$$1.updateQueue = null; current$$1.dependencies = null; - var alternate = current$$1.alternate; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; if (alternate !== null) { - alternate.return = null; - alternate.child = null; - alternate.memoizedState = null; - alternate.updateQueue = null; - alternate.dependencies = null; + detachFiber(alternate); } } diff --git a/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index 35fbfdae532a68..bdd42bfe734ab4 100644 --- a/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -5002,6 +5002,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) { createChildNodeSet(current$$1$jscomp$0.stateNode.containerInfo); } } +function detachFiber(current$$1) { + var alternate = current$$1.alternate; + current$$1.return = null; + current$$1.child = null; + current$$1.memoizedState = null; + current$$1.updateQueue = null; + current$$1.dependencies = null; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; + null !== alternate && detachFiber(alternate); +} function commitWork(current$$1, finishedWork) { switch (finishedWork.tag) { case 0: @@ -6239,18 +6253,7 @@ function commitRootImpl(root, renderPriorityLevel) { snapshot.sibling.return = snapshot.return; snapshot = snapshot.sibling; } - prevProps.return = null; - prevProps.child = null; - prevProps.memoizedState = null; - prevProps.updateQueue = null; - prevProps.dependencies = null; - var alternate = prevProps.alternate; - null !== alternate && - ((alternate.return = null), - (alternate.child = null), - (alternate.memoizedState = null), - (alternate.updateQueue = null), - (alternate.dependencies = null)); + detachFiber(prevProps); } nextEffect = nextEffect.nextEffect; } @@ -6313,20 +6316,20 @@ function commitRootImpl(root, renderPriorityLevel) { case 3: var _updateQueue = current$$1$jscomp$0.updateQueue; if (null !== _updateQueue) { - alternate = null; + current$$1 = null; if (null !== current$$1$jscomp$0.child) switch (current$$1$jscomp$0.child.tag) { case 5: - alternate = + current$$1 = current$$1$jscomp$0.child.stateNode.canonical; break; case 1: - alternate = current$$1$jscomp$0.child.stateNode; + current$$1 = current$$1$jscomp$0.child.stateNode; } commitUpdateQueue( current$$1$jscomp$0, _updateQueue, - alternate, + current$$1, currentRef ); } diff --git a/Libraries/Renderer/implementations/ReactFabric-prod.js b/Libraries/Renderer/implementations/ReactFabric-prod.js index b10ca758ec0c87..cb27940208bf4b 100644 --- a/Libraries/Renderer/implementations/ReactFabric-prod.js +++ b/Libraries/Renderer/implementations/ReactFabric-prod.js @@ -5002,6 +5002,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) { createChildNodeSet(current$$1$jscomp$0.stateNode.containerInfo); } } +function detachFiber(current$$1) { + var alternate = current$$1.alternate; + current$$1.return = null; + current$$1.child = null; + current$$1.memoizedState = null; + current$$1.updateQueue = null; + current$$1.dependencies = null; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; + null !== alternate && detachFiber(alternate); +} function commitWork(current$$1, finishedWork) { switch (finishedWork.tag) { case 0: @@ -6239,18 +6253,7 @@ function commitRootImpl(root, renderPriorityLevel) { snapshot.sibling.return = snapshot.return; snapshot = snapshot.sibling; } - prevProps.return = null; - prevProps.child = null; - prevProps.memoizedState = null; - prevProps.updateQueue = null; - prevProps.dependencies = null; - var alternate = prevProps.alternate; - null !== alternate && - ((alternate.return = null), - (alternate.child = null), - (alternate.memoizedState = null), - (alternate.updateQueue = null), - (alternate.dependencies = null)); + detachFiber(prevProps); } nextEffect = nextEffect.nextEffect; } @@ -6313,20 +6316,20 @@ function commitRootImpl(root, renderPriorityLevel) { case 3: var _updateQueue = current$$1$jscomp$0.updateQueue; if (null !== _updateQueue) { - alternate = null; + current$$1 = null; if (null !== current$$1$jscomp$0.child) switch (current$$1$jscomp$0.child.tag) { case 5: - alternate = + current$$1 = current$$1$jscomp$0.child.stateNode.canonical; break; case 1: - alternate = current$$1$jscomp$0.child.stateNode; + current$$1 = current$$1$jscomp$0.child.stateNode; } commitUpdateQueue( current$$1$jscomp$0, _updateQueue, - alternate, + current$$1, currentRef ); } diff --git a/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index 071f92097b6ce7..0b076cf2fb1f1e 100644 --- a/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -5354,6 +5354,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) { createChildNodeSet(current$$1$jscomp$0.stateNode.containerInfo); } } +function detachFiber(current$$1) { + var alternate = current$$1.alternate; + current$$1.return = null; + current$$1.child = null; + current$$1.memoizedState = null; + current$$1.updateQueue = null; + current$$1.dependencies = null; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; + null !== alternate && detachFiber(alternate); +} function commitWork(current$$1, finishedWork) { switch (finishedWork.tag) { case 0: @@ -6345,18 +6359,7 @@ function commitRootImpl(root, renderPriorityLevel) { snapshot.sibling.return = snapshot.return; snapshot = snapshot.sibling; } - prevProps.return = null; - prevProps.child = null; - prevProps.memoizedState = null; - prevProps.updateQueue = null; - prevProps.dependencies = null; - var alternate = prevProps.alternate; - null !== alternate && - ((alternate.return = null), - (alternate.child = null), - (alternate.memoizedState = null), - (alternate.updateQueue = null), - (alternate.dependencies = null)); + detachFiber(prevProps); } nextEffect = nextEffect.nextEffect; } @@ -6378,10 +6381,10 @@ function commitRootImpl(root, renderPriorityLevel) { ) { var effectTag$jscomp$0 = nextEffect.effectTag; if (effectTag$jscomp$0 & 36) { - current$$1 = effectTag; + prevProps = effectTag; var current$$1$jscomp$1 = nextEffect.alternate; currentRef = nextEffect; - alternate = current$$1$jscomp$0; + current$$1 = current$$1$jscomp$0; switch (currentRef.tag) { case 0: case 11: @@ -6413,26 +6416,26 @@ function commitRootImpl(root, renderPriorityLevel) { currentRef, updateQueue, instance$jscomp$0, - alternate + current$$1 ); break; case 3: var _updateQueue = currentRef.updateQueue; if (null !== _updateQueue) { - current$$1 = null; + prevProps = null; if (null !== currentRef.child) switch (currentRef.child.tag) { case 5: - current$$1 = currentRef.child.stateNode.canonical; + prevProps = currentRef.child.stateNode.canonical; break; case 1: - current$$1 = currentRef.child.stateNode; + prevProps = currentRef.child.stateNode; } commitUpdateQueue( currentRef, _updateQueue, - current$$1, - alternate + prevProps, + current$$1 ); } break; @@ -6458,7 +6461,7 @@ function commitRootImpl(root, renderPriorityLevel) { currentRef.treeBaseDuration, currentRef.actualStartTime, commitTime, - current$$1.memoizedInteractions + prevProps.memoizedInteractions ); break; case 13: diff --git a/Libraries/Renderer/implementations/ReactFabric-profiling.js b/Libraries/Renderer/implementations/ReactFabric-profiling.js index 1de09047ecc9a7..fe3c3e66758c5e 100644 --- a/Libraries/Renderer/implementations/ReactFabric-profiling.js +++ b/Libraries/Renderer/implementations/ReactFabric-profiling.js @@ -5354,6 +5354,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) { createChildNodeSet(current$$1$jscomp$0.stateNode.containerInfo); } } +function detachFiber(current$$1) { + var alternate = current$$1.alternate; + current$$1.return = null; + current$$1.child = null; + current$$1.memoizedState = null; + current$$1.updateQueue = null; + current$$1.dependencies = null; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; + null !== alternate && detachFiber(alternate); +} function commitWork(current$$1, finishedWork) { switch (finishedWork.tag) { case 0: @@ -6345,18 +6359,7 @@ function commitRootImpl(root, renderPriorityLevel) { snapshot.sibling.return = snapshot.return; snapshot = snapshot.sibling; } - prevProps.return = null; - prevProps.child = null; - prevProps.memoizedState = null; - prevProps.updateQueue = null; - prevProps.dependencies = null; - var alternate = prevProps.alternate; - null !== alternate && - ((alternate.return = null), - (alternate.child = null), - (alternate.memoizedState = null), - (alternate.updateQueue = null), - (alternate.dependencies = null)); + detachFiber(prevProps); } nextEffect = nextEffect.nextEffect; } @@ -6378,10 +6381,10 @@ function commitRootImpl(root, renderPriorityLevel) { ) { var effectTag$jscomp$0 = nextEffect.effectTag; if (effectTag$jscomp$0 & 36) { - current$$1 = effectTag; + prevProps = effectTag; var current$$1$jscomp$1 = nextEffect.alternate; currentRef = nextEffect; - alternate = current$$1$jscomp$0; + current$$1 = current$$1$jscomp$0; switch (currentRef.tag) { case 0: case 11: @@ -6413,26 +6416,26 @@ function commitRootImpl(root, renderPriorityLevel) { currentRef, updateQueue, instance$jscomp$0, - alternate + current$$1 ); break; case 3: var _updateQueue = currentRef.updateQueue; if (null !== _updateQueue) { - current$$1 = null; + prevProps = null; if (null !== currentRef.child) switch (currentRef.child.tag) { case 5: - current$$1 = currentRef.child.stateNode.canonical; + prevProps = currentRef.child.stateNode.canonical; break; case 1: - current$$1 = currentRef.child.stateNode; + prevProps = currentRef.child.stateNode; } commitUpdateQueue( currentRef, _updateQueue, - current$$1, - alternate + prevProps, + current$$1 ); } break; @@ -6458,7 +6461,7 @@ function commitRootImpl(root, renderPriorityLevel) { currentRef.treeBaseDuration, currentRef.actualStartTime, commitTime, - current$$1.memoizedInteractions + prevProps.memoizedInteractions ); break; case 13: diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index a9f3f89e72f218..d49e07e57817fa 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -6478,7 +6478,11 @@ function scheduleFibersWithFamiliesRecursively( if (staleFamilies.has(family)) { needsRemount = true; } else if (updatedFamilies.has(family)) { - needsRender = true; + if (tag === ClassComponent) { + needsRemount = true; + } else { + needsRender = true; + } } } } @@ -17441,6 +17445,7 @@ function commitNestedUnmounts(root, renderPriorityLevel) { } function detachFiber(current$$1) { + var alternate = current$$1.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we // should clear the child pointer of the parent alternate to let this // get GC:ed but we don't know which for sure which parent is the current @@ -17451,13 +17456,13 @@ function detachFiber(current$$1) { current$$1.memoizedState = null; current$$1.updateQueue = null; current$$1.dependencies = null; - var alternate = current$$1.alternate; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; if (alternate !== null) { - alternate.return = null; - alternate.child = null; - alternate.memoizedState = null; - alternate.updateQueue = null; - alternate.dependencies = null; + detachFiber(alternate); } } diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js index c21f80dc4e58ba..f145b4faab1a93 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js @@ -6474,7 +6474,11 @@ function scheduleFibersWithFamiliesRecursively( if (staleFamilies.has(family)) { needsRemount = true; } else if (updatedFamilies.has(family)) { - needsRender = true; + if (tag === ClassComponent) { + needsRemount = true; + } else { + needsRender = true; + } } } } @@ -17437,6 +17441,7 @@ function commitNestedUnmounts(root, renderPriorityLevel) { } function detachFiber(current$$1) { + var alternate = current$$1.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we // should clear the child pointer of the parent alternate to let this // get GC:ed but we don't know which for sure which parent is the current @@ -17447,13 +17452,13 @@ function detachFiber(current$$1) { current$$1.memoizedState = null; current$$1.updateQueue = null; current$$1.dependencies = null; - var alternate = current$$1.alternate; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; if (alternate !== null) { - alternate.return = null; - alternate.child = null; - alternate.memoizedState = null; - alternate.updateQueue = null; - alternate.dependencies = null; + detachFiber(alternate); } } diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index d5c1cabad48d05..bbf5d650790402 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -4838,6 +4838,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) { unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel); } } +function detachFiber(current$$1) { + var alternate = current$$1.alternate; + current$$1.return = null; + current$$1.child = null; + current$$1.memoizedState = null; + current$$1.updateQueue = null; + current$$1.dependencies = null; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; + null !== alternate && detachFiber(alternate); +} function isHostParent(fiber) { return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag; } @@ -6418,20 +6432,9 @@ function commitRootImpl(root, renderPriorityLevel) { commitWork(nextEffect.alternate, nextEffect); break; case 8: - prevProps = nextEffect; - unmountHostComponents(prevProps, current$$1); - prevProps.return = null; - prevProps.child = null; - prevProps.memoizedState = null; - prevProps.updateQueue = null; - prevProps.dependencies = null; - var alternate = prevProps.alternate; - null !== alternate && - ((alternate.return = null), - (alternate.child = null), - (alternate.memoizedState = null), - (alternate.updateQueue = null), - (alternate.dependencies = null)); + (prevProps = nextEffect), + unmountHostComponents(prevProps, current$$1), + detachFiber(prevProps); } nextEffect = nextEffect.nextEffect; } @@ -6494,19 +6497,19 @@ function commitRootImpl(root, renderPriorityLevel) { case 3: var _updateQueue = current$$1$jscomp$0.updateQueue; if (null !== _updateQueue) { - alternate = null; + current$$1 = null; if (null !== current$$1$jscomp$0.child) switch (current$$1$jscomp$0.child.tag) { case 5: - alternate = current$$1$jscomp$0.child.stateNode; + current$$1 = current$$1$jscomp$0.child.stateNode; break; case 1: - alternate = current$$1$jscomp$0.child.stateNode; + current$$1 = current$$1$jscomp$0.child.stateNode; } commitUpdateQueue( current$$1$jscomp$0, _updateQueue, - alternate, + current$$1, currentRef ); } diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js index 0d953540edf3e1..ab86d1df931694 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js @@ -4838,6 +4838,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) { unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel); } } +function detachFiber(current$$1) { + var alternate = current$$1.alternate; + current$$1.return = null; + current$$1.child = null; + current$$1.memoizedState = null; + current$$1.updateQueue = null; + current$$1.dependencies = null; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; + null !== alternate && detachFiber(alternate); +} function isHostParent(fiber) { return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag; } @@ -6418,20 +6432,9 @@ function commitRootImpl(root, renderPriorityLevel) { commitWork(nextEffect.alternate, nextEffect); break; case 8: - prevProps = nextEffect; - unmountHostComponents(prevProps, current$$1); - prevProps.return = null; - prevProps.child = null; - prevProps.memoizedState = null; - prevProps.updateQueue = null; - prevProps.dependencies = null; - var alternate = prevProps.alternate; - null !== alternate && - ((alternate.return = null), - (alternate.child = null), - (alternate.memoizedState = null), - (alternate.updateQueue = null), - (alternate.dependencies = null)); + (prevProps = nextEffect), + unmountHostComponents(prevProps, current$$1), + detachFiber(prevProps); } nextEffect = nextEffect.nextEffect; } @@ -6494,19 +6497,19 @@ function commitRootImpl(root, renderPriorityLevel) { case 3: var _updateQueue = current$$1$jscomp$0.updateQueue; if (null !== _updateQueue) { - alternate = null; + current$$1 = null; if (null !== current$$1$jscomp$0.child) switch (current$$1$jscomp$0.child.tag) { case 5: - alternate = current$$1$jscomp$0.child.stateNode; + current$$1 = current$$1$jscomp$0.child.stateNode; break; case 1: - alternate = current$$1$jscomp$0.child.stateNode; + current$$1 = current$$1$jscomp$0.child.stateNode; } commitUpdateQueue( current$$1$jscomp$0, _updateQueue, - alternate, + current$$1, currentRef ); } diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index 07581c709acadc..f80a94c7434a75 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -5194,6 +5194,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) { unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel); } } +function detachFiber(current$$1) { + var alternate = current$$1.alternate; + current$$1.return = null; + current$$1.child = null; + current$$1.memoizedState = null; + current$$1.updateQueue = null; + current$$1.dependencies = null; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; + null !== alternate && detachFiber(alternate); +} function isHostParent(fiber) { return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag; } @@ -6517,20 +6531,9 @@ function commitRootImpl(root, renderPriorityLevel) { commitWork(nextEffect.alternate, nextEffect); break; case 8: - prevProps = nextEffect; - unmountHostComponents(prevProps, current$$1); - prevProps.return = null; - prevProps.child = null; - prevProps.memoizedState = null; - prevProps.updateQueue = null; - prevProps.dependencies = null; - var alternate = prevProps.alternate; - null !== alternate && - ((alternate.return = null), - (alternate.child = null), - (alternate.memoizedState = null), - (alternate.updateQueue = null), - (alternate.dependencies = null)); + (prevProps = nextEffect), + unmountHostComponents(prevProps, current$$1), + detachFiber(prevProps); } nextEffect = nextEffect.nextEffect; } @@ -6552,10 +6555,10 @@ function commitRootImpl(root, renderPriorityLevel) { ) { var effectTag$jscomp$0 = nextEffect.effectTag; if (effectTag$jscomp$0 & 36) { - current$$1 = effectTag; + prevProps = effectTag; var current$$1$jscomp$1 = nextEffect.alternate; currentRef = nextEffect; - alternate = current$$1$jscomp$0; + current$$1 = current$$1$jscomp$0; switch (currentRef.tag) { case 0: case 11: @@ -6587,26 +6590,26 @@ function commitRootImpl(root, renderPriorityLevel) { currentRef, updateQueue, instance$jscomp$0, - alternate + current$$1 ); break; case 3: var _updateQueue = currentRef.updateQueue; if (null !== _updateQueue) { - current$$1 = null; + prevProps = null; if (null !== currentRef.child) switch (currentRef.child.tag) { case 5: - current$$1 = currentRef.child.stateNode; + prevProps = currentRef.child.stateNode; break; case 1: - current$$1 = currentRef.child.stateNode; + prevProps = currentRef.child.stateNode; } commitUpdateQueue( currentRef, _updateQueue, - current$$1, - alternate + prevProps, + current$$1 ); } break; @@ -6626,7 +6629,7 @@ function commitRootImpl(root, renderPriorityLevel) { currentRef.treeBaseDuration, currentRef.actualStartTime, commitTime, - current$$1.memoizedInteractions + prevProps.memoizedInteractions ); break; case 13: diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js index f0f9fac5063b6c..ffd674724876f3 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js @@ -5194,6 +5194,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) { unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel); } } +function detachFiber(current$$1) { + var alternate = current$$1.alternate; + current$$1.return = null; + current$$1.child = null; + current$$1.memoizedState = null; + current$$1.updateQueue = null; + current$$1.dependencies = null; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; + null !== alternate && detachFiber(alternate); +} function isHostParent(fiber) { return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag; } @@ -6517,20 +6531,9 @@ function commitRootImpl(root, renderPriorityLevel) { commitWork(nextEffect.alternate, nextEffect); break; case 8: - prevProps = nextEffect; - unmountHostComponents(prevProps, current$$1); - prevProps.return = null; - prevProps.child = null; - prevProps.memoizedState = null; - prevProps.updateQueue = null; - prevProps.dependencies = null; - var alternate = prevProps.alternate; - null !== alternate && - ((alternate.return = null), - (alternate.child = null), - (alternate.memoizedState = null), - (alternate.updateQueue = null), - (alternate.dependencies = null)); + (prevProps = nextEffect), + unmountHostComponents(prevProps, current$$1), + detachFiber(prevProps); } nextEffect = nextEffect.nextEffect; } @@ -6552,10 +6555,10 @@ function commitRootImpl(root, renderPriorityLevel) { ) { var effectTag$jscomp$0 = nextEffect.effectTag; if (effectTag$jscomp$0 & 36) { - current$$1 = effectTag; + prevProps = effectTag; var current$$1$jscomp$1 = nextEffect.alternate; currentRef = nextEffect; - alternate = current$$1$jscomp$0; + current$$1 = current$$1$jscomp$0; switch (currentRef.tag) { case 0: case 11: @@ -6587,26 +6590,26 @@ function commitRootImpl(root, renderPriorityLevel) { currentRef, updateQueue, instance$jscomp$0, - alternate + current$$1 ); break; case 3: var _updateQueue = currentRef.updateQueue; if (null !== _updateQueue) { - current$$1 = null; + prevProps = null; if (null !== currentRef.child) switch (currentRef.child.tag) { case 5: - current$$1 = currentRef.child.stateNode; + prevProps = currentRef.child.stateNode; break; case 1: - current$$1 = currentRef.child.stateNode; + prevProps = currentRef.child.stateNode; } commitUpdateQueue( currentRef, _updateQueue, - current$$1, - alternate + prevProps, + current$$1 ); } break; @@ -6626,7 +6629,7 @@ function commitRootImpl(root, renderPriorityLevel) { currentRef.treeBaseDuration, currentRef.actualStartTime, commitTime, - current$$1.memoizedInteractions + prevProps.memoizedInteractions ); break; case 13: