Skip to content

Commit

Permalink
[Fizz] Pass task.childIndex in retryReplayTask (#27594)
Browse files Browse the repository at this point in the history
This was missed that we track the child index on the task. The
equivalent in retryRenderTask already has this.

The effect is that a lazy node that suspends gets its child index reset
to -1 even though it should resume in the index it left off.

DiffTrain build for [8c8ee9e](8c8ee9e)
  • Loading branch information
acdlite committed Oct 26, 2023
1 parent 242f985 commit 9bdb530
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 14 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
97047a810cb19e3041a3ec163f4fde85f495bdc1
8c8ee9ee618eace9199b7c80f4cd2d6f20ecfb73
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}

var ReactVersion = "18.3.0-www-modern-f0ea8864";
var ReactVersion = "18.3.0-www-modern-8895715e";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -9850,7 +9850,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-modern-4b9b2c3c",
version: "18.3.0-www-modern-b1c48f3b",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1302 = {
Expand Down Expand Up @@ -9881,7 +9881,7 @@ var internals$jscomp$inline_1302 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-4b9b2c3c"
reconcilerVersion: "18.3.0-www-modern-b1c48f3b"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1303 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
10 changes: 8 additions & 2 deletions compiled/facebook-www/ReactDOMServer-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "18.3.0-www-classic-38d7e1a0";
var ReactVersion = "18.3.0-www-classic-529c102c";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down Expand Up @@ -12669,7 +12669,13 @@ function retryReplayTask(request, task) {
// component suspends again, the thenable state will be restored.
var prevThenableState = task.thenableState;
task.thenableState = null;
renderNodeDestructive(request, task, prevThenableState, task.node, -1);
renderNodeDestructive(
request,
task,
prevThenableState,
task.node,
task.childIndex
);

if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0) {
throw new Error(
Expand Down
10 changes: 8 additions & 2 deletions compiled/facebook-www/ReactDOMServer-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "18.3.0-www-modern-f0ea8864";
var ReactVersion = "18.3.0-www-modern-8895715e";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down Expand Up @@ -12417,7 +12417,13 @@ function retryReplayTask(request, task) {
// component suspends again, the thenable state will be restored.
var prevThenableState = task.thenableState;
task.thenableState = null;
renderNodeDestructive(request, task, prevThenableState, task.node, -1);
renderNodeDestructive(
request,
task,
prevThenableState,
task.node,
task.childIndex
);

if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0) {
throw new Error(
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactDOMServer-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -4291,7 +4291,7 @@ function performWork(request$jscomp$2) {
task,
prevThenableState,
task.node,
-1
task.childIndex
);
if (
1 === task.replay.pendingTasks &&
Expand Down Expand Up @@ -5054,4 +5054,4 @@ exports.renderToString = function (children, options) {
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "18.3.0-www-classic-38c26c34";
exports.version = "18.3.0-www-classic-bcc2173c";
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactDOMServer-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -4226,7 +4226,7 @@ function performWork(request$jscomp$2) {
task,
prevThenableState,
task.node,
-1
task.childIndex
);
if (
1 === task.replay.pendingTasks &&
Expand Down Expand Up @@ -4989,4 +4989,4 @@ exports.renderToString = function (children, options) {
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "18.3.0-www-modern-4b9b2c3c";
exports.version = "18.3.0-www-modern-b1c48f3b";
8 changes: 7 additions & 1 deletion compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -12301,7 +12301,13 @@ function retryReplayTask(request, task) {
// component suspends again, the thenable state will be restored.
var prevThenableState = task.thenableState;
task.thenableState = null;
renderNodeDestructive(request, task, prevThenableState, task.node, -1);
renderNodeDestructive(
request,
task,
prevThenableState,
task.node,
task.childIndex
);

if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0) {
throw new Error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4732,7 +4732,7 @@ exports.renderNextChunk = function (stream) {
task$jscomp$0,
prevThenableState,
task$jscomp$0.node,
-1
task$jscomp$0.childIndex
);
if (
1 === task$jscomp$0.replay.pendingTasks &&
Expand Down

0 comments on commit 9bdb530

Please sign in to comment.