(returnFiber, childToDelete)
| 8946 | // live outside of this function. |
| 8947 | function ChildReconciler(shouldTrackSideEffects) { |
| 8948 | function deleteChild(returnFiber, childToDelete) { |
| 8949 | if (!shouldTrackSideEffects) { |
| 8950 | // Noop. |
| 8951 | return; |
| 8952 | } |
| 8953 | // Deletions are added in reversed order so we add it to the front. |
| 8954 | // At this point, the return fiber's effect list is empty except for |
| 8955 | // deletions, so we can just append the deletion to the list. The remaining |
| 8956 | // effects aren't added until the complete phase. Once we implement |
| 8957 | // resuming, this may not be true. |
| 8958 | var last = returnFiber.lastEffect; |
| 8959 | if (last !== null) { |
| 8960 | last.nextEffect = childToDelete; |
| 8961 | returnFiber.lastEffect = childToDelete; |
| 8962 | } else { |
| 8963 | returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; |
| 8964 | } |
| 8965 | childToDelete.nextEffect = null; |
| 8966 | childToDelete.effectTag = Deletion; |
| 8967 | } |
| 8968 | |
| 8969 | function deleteRemainingChildren(returnFiber, currentFirstChild) { |
| 8970 | if (!shouldTrackSideEffects) { |
no outgoing calls
no test coverage detected