(request: Request, task: Task)
| 2054 | } |
| 2055 | |
| 2056 | function outlineTask(request: Request, task: Task): ReactJSONValue { |
| 2057 | const newTask = createTask( |
| 2058 | request, |
| 2059 | task.model, // the currently rendering element |
| 2060 | task.keyPath, // unlike outlineModel this one carries along context |
| 2061 | task.implicitSlot, |
| 2062 | task.formatContext, |
| 2063 | request.abortableTasks, |
| 2064 | enableProfilerTimer && |
| 2065 | (enableComponentPerformanceTrack || enableAsyncDebugInfo) |
| 2066 | ? task.time |
| 2067 | : 0, |
| 2068 | __DEV__ ? task.debugOwner : null, |
| 2069 | __DEV__ ? task.debugStack : null, |
| 2070 | __DEV__ ? task.debugTask : null, |
| 2071 | ); |
| 2072 | |
| 2073 | retryTask(request, newTask); |
| 2074 | if (newTask.status === COMPLETED) { |
| 2075 | // We completed synchronously so we can refer to this by reference. This |
| 2076 | // makes it behaves the same as prod during deserialization. |
| 2077 | return serializeByValueID(newTask.id); |
| 2078 | } |
| 2079 | // This didn't complete synchronously so it wouldn't have even if we didn't |
| 2080 | // outline it, so this would reduce to a lazy reference even in prod. |
| 2081 | return serializeLazyID(newTask.id); |
| 2082 | } |
| 2083 | |
| 2084 | function outlineHaltedTask( |
| 2085 | request: Request, |
no test coverage detected