( request: Request, task: RenderTask, reason: string, thrownInfo: ThrownInfo, )
| 4034 | } |
| 4035 | |
| 4036 | function injectPostponedHole( |
| 4037 | request: Request, |
| 4038 | task: RenderTask, |
| 4039 | reason: string, |
| 4040 | thrownInfo: ThrownInfo, |
| 4041 | ): Segment { |
| 4042 | logPostpone(request, reason, thrownInfo, __DEV__ ? task.debugTask : null); |
| 4043 | // Something suspended, we'll need to create a new segment and resolve it later. |
| 4044 | const segment = task.blockedSegment; |
| 4045 | const insertionIndex = segment.chunks.length; |
| 4046 | const newSegment = createPendingSegment( |
| 4047 | request, |
| 4048 | insertionIndex, |
| 4049 | null, |
| 4050 | task.formatContext, |
| 4051 | // Adopt the parent segment's leading text embed |
| 4052 | segment.lastPushedText, |
| 4053 | // Assume we are text embedded at the trailing edge |
| 4054 | true, |
| 4055 | ); |
| 4056 | segment.children.push(newSegment); |
| 4057 | // Reset lastPushedText for current Segment since the new Segment "consumed" it |
| 4058 | segment.lastPushedText = false; |
| 4059 | return newSegment; |
| 4060 | } |
| 4061 | |
| 4062 | function spawnNewSuspendedReplayTask( |
| 4063 | request: Request, |
no test coverage detected