[Fizz] Reset Instructions on ResumableState (#33046)

When we end up creating an incomplete state in the shell we end up not
flushing anything. As a hack, in this case we need to reset the
ResumableState because some of the ResumableState is still relevant
(e.g. any preloads that went into headers) but some of the
ResumableState needs to be reset since they assume that what we produced
actually flushed.

We didn't reset the instructions state but we haven't actually flushed
any of the instructions so it needs to reset.
This commit is contained in:
Sebastian Markbåge 2025-04-28 15:50:06 -04:00 committed by GitHub
parent c498bfce8b
commit 5dc00d6b2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -695,6 +695,7 @@ export function resetResumableState(
resumableState.scriptResources = {}; resumableState.scriptResources = {};
resumableState.moduleUnknownResources = {}; resumableState.moduleUnknownResources = {};
resumableState.moduleScriptResources = {}; resumableState.moduleScriptResources = {};
resumableState.instructions = NothingSent; // Nothing was flushed so no instructions could've flushed.
} }
export function completeResumableState(resumableState: ResumableState): void { export function completeResumableState(resumableState: ResumableState): void {