Unverified Commit f2fc8621 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Node.js streams: Add forkpoint for renderWithRestartOnCacheMissInValidation (#92512)

## What?

Building on top of the changes in #92252. This PR implements similar
fork points for renderWithRestartOnCacheMissInValidation
parent f3f3d8a5
...@@ -6390,6 +6390,9 @@ async function renderWithRestartOnCacheMissInValidation( ...@@ -6390,6 +6390,9 @@ async function renderWithRestartOnCacheMissInValidation(
}> { }> {
const { componentMod: ComponentMod } = ctx const { componentMod: ComponentMod } = ctx
const { clientModules } = getClientReferenceManifest() const { clientModules } = getClientReferenceManifest()
const renderFlightStream = process.env.__NEXT_USE_NODE_STREAMS
? renderToNodeFlightStream
: renderToWebFlightStream
let startTime = -Infinity let startTime = -Infinity
let requestStore: RequestStore = initialRequestStore let requestStore: RequestStore = initialRequestStore
...@@ -6454,7 +6457,7 @@ async function renderWithRestartOnCacheMissInValidation( ...@@ -6454,7 +6457,7 @@ async function renderWithRestartOnCacheMissInValidation(
const stream = workUnitAsyncStorage.run( const stream = workUnitAsyncStorage.run(
requestStore, requestStore,
renderToWebFlightStream, renderFlightStream,
ComponentMod, ComponentMod,
initialRscPayload, initialRscPayload,
clientModules, clientModules,
...@@ -6555,7 +6558,7 @@ async function renderWithRestartOnCacheMissInValidation( ...@@ -6555,7 +6558,7 @@ async function renderWithRestartOnCacheMissInValidation(
const stream = workUnitAsyncStorage.run( const stream = workUnitAsyncStorage.run(
requestStore, requestStore,
renderToWebFlightStream, renderFlightStream,
ComponentMod, ComponentMod,
finalRscPayload, finalRscPayload,
clientModules, clientModules,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment