( request: Request, id: number, debugInfo: ReactDebugInfoEntry, )
| 4241 | } |
| 4242 | |
| 4243 | function emitDebugChunk( |
| 4244 | request: Request, |
| 4245 | id: number, |
| 4246 | debugInfo: ReactDebugInfoEntry, |
| 4247 | ): void { |
| 4248 | if (!__DEV__) { |
| 4249 | // These errors should never make it into a build so we don't need to encode them in codes.json |
| 4250 | // eslint-disable-next-line react-internal/prod-error-codes |
| 4251 | throw new Error( |
| 4252 | 'emitDebugChunk should never be called in production mode. This is a bug in React.', |
| 4253 | ); |
| 4254 | } |
| 4255 | |
| 4256 | const json: string = serializeDebugModel(request, 500, debugInfo); |
| 4257 | if (request.debugDestination !== null) { |
| 4258 | // Outline the actual timing information to the debug channel. |
| 4259 | const outlinedId = request.nextChunkId++; |
| 4260 | const debugRow = outlinedId.toString(16) + ':' + json + '\n'; |
| 4261 | request.pendingDebugChunks++; |
| 4262 | request.completedDebugChunks.push(stringToChunk(debugRow)); |
| 4263 | const row = |
| 4264 | serializeRowHeader('D', id) + '"$' + outlinedId.toString(16) + '"\n'; |
| 4265 | request.completedRegularChunks.push(stringToChunk(row)); |
| 4266 | } else { |
| 4267 | const row = serializeRowHeader('D', id) + json + '\n'; |
| 4268 | request.completedRegularChunks.push(stringToChunk(row)); |
| 4269 | } |
| 4270 | } |
| 4271 | |
| 4272 | function outlineComponentInfo( |
| 4273 | request: Request, |
no test coverage detected