(returnFiber, childToDelete)
| 8235 | // live outside of this function. |
| 8236 | function ChildReconciler(shouldTrackSideEffects) { |
| 8237 | function deleteChild(returnFiber, childToDelete) { |
| 8238 | if (!shouldTrackSideEffects) { |
| 8239 | // Noop. |
| 8240 | return; |
| 8241 | } |
| 8242 | // Deletions are added in reversed order so we add it to the front. |
| 8243 | // At this point, the return fiber's effect list is empty except for |
| 8244 | // deletions, so we can just append the deletion to the list. The remaining |
| 8245 | // effects aren't added until the complete phase. Once we implement |
| 8246 | // resuming, this may not be true. |
| 8247 | var last = returnFiber.lastEffect; |
| 8248 | if (last !== null) { |
| 8249 | last.nextEffect = childToDelete; |
| 8250 | returnFiber.lastEffect = childToDelete; |
| 8251 | } else { |
| 8252 | returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; |
| 8253 | } |
| 8254 | childToDelete.nextEffect = null; |
| 8255 | childToDelete.effectTag = Deletion; |
| 8256 | } |
| 8257 | |
| 8258 | function deleteRemainingChildren(returnFiber, currentFirstChild) { |
| 8259 | if (!shouldTrackSideEffects) { |
no outgoing calls
no test coverage detected