8000 [Flight] Emit start time before an await if one wasn't emitted already by sebmarkbage · Pull Request #33646 · facebook/react · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Flight] Emit start time before an await if one wasn't emitted already #33646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/react-server/src/ReactFlightServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2211,6 +2211,10 @@ function emitAsyncSequence(
debugInfo.stack = filterStackTrace(request, parseStackTrace(stack, 1));
}
}
// We don't have a start time for this await but in case there was no start time emitted
// we need to include something. TODO: We should maybe ideally track the time when we
// called .then() but without updating the task.time field since that's used for the cutoff.
advanceTaskTime(request, task, task.time);
emitDebugChunk(request, task.id, debugInfo);
// Mark the end time of the await. If we're aborting then we don't emit this
// to signal that this never resolved inside this render.
Expand Down Expand Up @@ -4752,6 +4756,10 @@ function forwardDebugInfoFromAbortedTask(request: Request, task: Task): void {
awaited: ((node: any): ReactIOInfo), // This is deduped by this reference.
env: env,
};
// We don't have a start time for this await but in case there was no start time emitted
// we need to include something. TODO: We should maybe ideally track the time when we
// called .then() but without updating the task.time field since that's used for the cutoff.
advanceTaskTime(request, task, task.time);
emitDebugChunk(request, task.id, asyncInfo);
} else {
emitAsyncSequence(request, task, sequence, debugInfo, null, null);
Expand Down
Loading
0