MCPcopy
hub / github.com/facebook/react / outlineIOInfo

Function outlineIOInfo

packages/react-server/src/ReactFlightServer.js:4398–4433  ·  view source on GitHub ↗
(request: Request, ioInfo: ReactIOInfo)

Source from the content-addressed store, hash-verified

4396}
4397
4398function 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
4435function serializeIONode(
4436 request: Request,

Callers 1

forwardDebugInfoFunction · 0.85

Calls 7

outlineComponentInfoFunction · 0.85
filterStackTraceFunction · 0.85
emitIOInfoChunkFunction · 0.85
setMethod · 0.80
parseStackTraceFunction · 0.70
serializeByValueIDFunction · 0.70
hasMethod · 0.65

Tested by

no test coverage detected