( request: Request, task: Task, node: ReactNodeList, childIndex: number, )
| 3288 | // This function by it self renders a node and consumes the task by mutating it |
| 3289 | // to update the current execution state. |
| 3290 | function renderNodeDestructive( |
| 3291 | request: Request, |
| 3292 | task: Task, |
| 3293 | node: ReactNodeList, |
| 3294 | childIndex: number, |
| 3295 | ): void { |
| 3296 | if (task.replay !== null && typeof task.replay.slots === 'number') { |
| 3297 | // TODO: Figure out a cheaper place than this hot path to do this check. |
| 3298 | const resumeSegmentID = task.replay.slots; |
| 3299 | resumeNode(request, task, resumeSegmentID, node, childIndex); |
| 3300 | return; |
| 3301 | } |
| 3302 | // Stash the node we're working on. We'll pick up from this task in case |
| 3303 | // something suspends. |
| 3304 | task.node = node; |
| 3305 | task.childIndex = childIndex; |
| 3306 | |
| 3307 | const previousComponentStack = task.componentStack; |
| 3308 | const previousDebugTask = __DEV__ ? task.debugTask : null; |
| 3309 | |
| 3310 | pushComponentStack(task); |
| 3311 | |
| 3312 | retryNode(request, task); |
| 3313 | |
| 3314 | task.componentStack = previousComponentStack; |
| 3315 | if (__DEV__) { |
| 3316 | task.debugTask = previousDebugTask; |
| 3317 | } |
| 3318 | } |
| 3319 | |
| 3320 | function retryNode(request: Request, task: Task): void { |
| 3321 | const node = task.node; |
no test coverage detected