mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 00:20:04 +01:00
[Flight] Fix stack getting object limited (#33733)
Because the object limit is unfortunately depth first due to limitations of JSON stringify, we need to ensure that things we really don't want outlined are first in the enumeration order. We add the stack length to the object limit to ensure that the stack frames aren't outlined. In console all the user space arguments are at the end of the args. In server component props, the props are at the end of the properties of the element. For the `value` of I/O we had it before the stack so it could steal the limit from the stack. The fix is to put it at the end.
This commit is contained in:
parent
befc1246b0
commit
777264b4ef
|
|
@ -4072,10 +4072,6 @@ function emitIOInfoChunk(
|
|||
start: relativeStartTimestamp,
|
||||
end: relativeEndTimestamp,
|
||||
};
|
||||
if (value !== undefined) {
|
||||
// $FlowFixMe[cannot-write]
|
||||
debugIOInfo.value = value;
|
||||
}
|
||||
if (env != null) {
|
||||
// $FlowFixMe[cannot-write]
|
||||
debugIOInfo.env = env;
|
||||
|
|
@ -4088,6 +4084,10 @@ function emitIOInfoChunk(
|
|||
// $FlowFixMe[cannot-write]
|
||||
debugIOInfo.owner = owner;
|
||||
}
|
||||
if (value !== undefined) {
|
||||
// $FlowFixMe[cannot-write]
|
||||
debugIOInfo.value = value;
|
||||
}
|
||||
const json: string = serializeDebugModel(request, objectLimit, debugIOInfo);
|
||||
const row = id.toString(16) + ':J' + json + '\n';
|
||||
const processedChunk = stringToChunk(row);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user