(returnFiber, childToDelete)
| 9004 | // live outside of this function. |
| 9005 | function ChildReconciler(shouldTrackSideEffects) { |
| 9006 | function deleteChild(returnFiber, childToDelete) { |
| 9007 | if (!shouldTrackSideEffects) { |
| 9008 | // Noop. |
| 9009 | return; |
| 9010 | } |
| 9011 | // Deletions are added in reversed order so we add it to the front. |
| 9012 | // At this point, the return fiber's effect list is empty except for |
| 9013 | // deletions, so we can just append the deletion to the list. The remaining |
| 9014 | // effects aren't added until the complete phase. Once we implement |
| 9015 | // resuming, this may not be true. |
| 9016 | var last = returnFiber.lastEffect; |
| 9017 | if (last !== null) { |
| 9018 | last.nextEffect = childToDelete; |
| 9019 | returnFiber.lastEffect = childToDelete; |
| 9020 | } else { |
| 9021 | returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; |
| 9022 | } |
| 9023 | childToDelete.nextEffect = null; |
| 9024 | childToDelete.effectTag = Deletion; |
| 9025 | } |
| 9026 | |
| 9027 | function deleteRemainingChildren(returnFiber, currentFirstChild) { |
| 9028 | if (!shouldTrackSideEffects) { |
no outgoing calls
no test coverage detected