1930
}
1931
// Outline the IO node.
1932
serializeIONode(request, ioNode);
1933
+ // We log the environment at the time when the last promise pigned ping which may
1934
+ // be later than what the environment was when we actually started awaiting.
1935
+ const env = (0, request.environmentName)();
1936
// Then emit a reference to us awaiting it in the current task.
1937
request.pendingChunks++;
1938
emitDebugChunk(request, task.id, {
1939
awaited: ((ioNode: any): ReactIOInfo), // This is deduped by this reference.
1940
+ env: env,
1941
owner: node.owner,
1942
stack: stack,
1943
});
1973
}
1974
serializeIONode(request, awaitedNode);
1975
request.pendingChunks++;
1976
+ // We log the environment at the time when we ping which may be later than what the
1977
+ // environment was when we actually started awaiting.
1978
+ const env = (0, request.environmentName)();
1979
emitDebugChunk(request, task.id, {
1980
awaited: ((awaitedNode: any): ReactIOInfo), // This is deduped by this reference.
1981
+ env: env,
1982
});
1983
}
1984
}
3532
name: string,
3533
start: number,
3534
end: number,
3535
+ env: ?string,
3536
owner: ?ReactComponentInfo,
3537
stack: ?ReactStackTrace,
3538
): void {
3572
start: relativeStartTimestamp,
3573
end: relativeEndTimestamp,
3574
};
3575
+ if (env != null) {
3576
+ // $FlowFixMe[cannot-write]
3577
+ debugIOInfo.env = env;
3578
+ }
3579
if (stack != null) {
3580
// $FlowFixMe[cannot-write]
3581
debugIOInfo.stack = stack;
3610
ioInfo.name,
3611
ioInfo.start,
3612
ioInfo.end,
3613
+ ioInfo.env,
3614
owner,
3615
ioInfo.stack,
3616
);
3647
outlineComponentInfo(request, owner);
3648
}
3649
3650
+ // We log the environment at the time when we serialize the I/O node.
3651
+ // The environment name may have changed from when the I/O was actually started.
3652
+ const env = (0, request.environmentName)();
3653
+
3654
request.pendingChunks++;
3655
const id = request.nextChunkId++;
3638
- emitIOInfoChunk(request, id, name, ioNode.start, ioNode.end, owner, stack);
3656
+ emitIOInfoChunk(
3657
+ request,
3658
+ id,
3659
+ name,
3660
+ ioNode.start,
3661
+ ioNode.end,
3662
+ env,
3663
+ owner,
3664
+ stack,
3665
+ );
3666
const ref = serializeByValueID(id);
3667
request.writtenObjects.set(ioNode, ref);
3668
return ref;
4188
const debugAsyncInfo: Omit<ReactAsyncInfo, 'debugTask' | 'debugStack'> =
4189
{
4190
awaited: ioInfo,
4191
+ env: debugInfo[i].env,
4192
owner: debugInfo[i].owner,
4193
stack: debugInfo[i].stack,
4194
};