( task: Task, request: Request, errorId: number, )
| 5804 | } |
| 5805 | |
| 5806 | function finishAbortedTask( |
| 5807 | task: Task, |
| 5808 | request: Request, |
| 5809 | errorId: number, |
| 5810 | ): void { |
| 5811 | if (task.status !== ABORTED) { |
| 5812 | return; |
| 5813 | } |
| 5814 | forwardDebugInfoFromAbortedTask(request, task); |
| 5815 | // Track when we aborted this task as its end time. |
| 5816 | if ( |
| 5817 | enableProfilerTimer && |
| 5818 | (enableComponentPerformanceTrack || enableAsyncDebugInfo) |
| 5819 | ) { |
| 5820 | if (task.timed) { |
| 5821 | markOperationEndTime(request, task, request.abortTime); |
| 5822 | } |
| 5823 | } |
| 5824 | // Instead of emitting an error per task.id, we emit a model that only |
| 5825 | // has a single value referencing the error. |
| 5826 | const ref = serializeByValueID(errorId); |
| 5827 | const processedChunk = encodeReferenceChunk(request, task.id, ref); |
| 5828 | request.completedErrorChunks.push(processedChunk); |
| 5829 | } |
| 5830 | |
| 5831 | function haltTask(task: Task, request: Request): void { |
| 5832 | if (task.status !== PENDING) { |
no test coverage detected