(request: Request, ioInfo: ReactIOInfo)
| 4396 | } |
| 4397 | |
| 4398 | function outlineIOInfo(request: Request, ioInfo: ReactIOInfo): void { |
| 4399 | if (request.writtenObjects.has(ioInfo)) { |
| 4400 | // Already written |
| 4401 | return; |
| 4402 | } |
| 4403 | // We can't serialize the ConsoleTask/Error objects so we need to omit them before serializing. |
| 4404 | request.pendingDebugChunks++; |
| 4405 | const id = request.nextChunkId++; |
| 4406 | const owner = ioInfo.owner; |
| 4407 | // Ensure the owner is already outlined. |
| 4408 | if (owner != null) { |
| 4409 | outlineComponentInfo(request, owner); |
| 4410 | } |
| 4411 | let debugStack; |
| 4412 | if (ioInfo.stack == null && ioInfo.debugStack != null) { |
| 4413 | // If we have a debugStack but no parsed stack we should parse it. |
| 4414 | debugStack = filterStackTrace( |
| 4415 | request, |
| 4416 | parseStackTrace(ioInfo.debugStack, 1), |
| 4417 | ); |
| 4418 | } else { |
| 4419 | debugStack = ioInfo.stack; |
| 4420 | } |
| 4421 | emitIOInfoChunk( |
| 4422 | request, |
| 4423 | id, |
| 4424 | ioInfo.name, |
| 4425 | ioInfo.start, |
| 4426 | ioInfo.end, |
| 4427 | ioInfo.value, |
| 4428 | ioInfo.env, |
| 4429 | owner, |
| 4430 | debugStack, |
| 4431 | ); |
| 4432 | request.writtenDebugObjects.set(ioInfo, serializeByValueID(id)); |
| 4433 | } |
| 4434 | |
| 4435 | function serializeIONode( |
| 4436 | request: Request, |
no test coverage detected