Skip to content

Commit 0bdbe43

Browse files
committed
[Fizz] Fix Client Render after Postpone (#27905)
If we end up client rendering a boundary due to an error after we have already injected a postponed hole in that boundary we'll end up trying to target a missing segment. Since we never insert segments for an already errored boundary into the HTML. Normally an errored prerender wouldn't be used but if it is, such as if it was an intentional client error it triggers this case. Those should really be replaced with postpones though. This is a bit annoying since we eagerly build up the postponed path. I took the easy route here and just cleared out the suspense boundary itself from having any postponed slots. However, this still creates an unnecessary replay path along the way to the boundary. We could probably walk the path and remove any empty parent nodes. What is worse is that if this is the only thing that postponed, we'd still generate a postponed state even though there's actually nothing to resume. Since this is a bit of an edge case already maybe it's fine. In my test I added a check for the `error` event on `window` since this error only surfaces by throwing an ignored error. We should really do that globally for all tests. Our tests should fail by default if there's an error logged to the window. DiffTrain build for commit f9dddcb.
1 parent 92eda60 commit 0bdbe43

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25524,7 +25524,7 @@ if (__DEV__) {
2552425524
return root;
2552525525
}
2552625526

25527-
var ReactVersion = "18.3.0-canary-f1039be4a-20240107";
25527+
var ReactVersion = "18.3.0-canary-f9dddcbbb-20240108";
2552825528

2552925529
// Might add PROFILE later.
2553025530

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9117,7 +9117,7 @@ var devToolsConfig$jscomp$inline_1037 = {
91179117
throw Error("TestRenderer does not support findFiberByHostInstance()");
91189118
},
91199119
bundleType: 0,
9120-
version: "18.3.0-canary-f1039be4a-20240107",
9120+
version: "18.3.0-canary-f9dddcbbb-20240108",
91219121
rendererPackageName: "react-test-renderer"
91229122
};
91239123
var internals$jscomp$inline_1230 = {
@@ -9148,7 +9148,7 @@ var internals$jscomp$inline_1230 = {
91489148
scheduleRoot: null,
91499149
setRefreshHandler: null,
91509150
getCurrentFiber: null,
9151-
reconcilerVersion: "18.3.0-canary-f1039be4a-20240107"
9151+
reconcilerVersion: "18.3.0-canary-f9dddcbbb-20240108"
91529152
};
91539153
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
91549154
var hook$jscomp$inline_1231 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9545,7 +9545,7 @@ var devToolsConfig$jscomp$inline_1079 = {
95459545
throw Error("TestRenderer does not support findFiberByHostInstance()");
95469546
},
95479547
bundleType: 0,
9548-
version: "18.3.0-canary-f1039be4a-20240107",
9548+
version: "18.3.0-canary-f9dddcbbb-20240108",
95499549
rendererPackageName: "react-test-renderer"
95509550
};
95519551
var internals$jscomp$inline_1271 = {
@@ -9576,7 +9576,7 @@ var internals$jscomp$inline_1271 = {
95769576
scheduleRoot: null,
95779577
setRefreshHandler: null,
95789578
getCurrentFiber: null,
9579-
reconcilerVersion: "18.3.0-canary-f1039be4a-20240107"
9579+
reconcilerVersion: "18.3.0-canary-f9dddcbbb-20240108"
95809580
};
95819581
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
95829582
var hook$jscomp$inline_1272 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if (__DEV__) {
2424
) {
2525
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
2626
}
27-
var ReactVersion = "18.3.0-canary-f1039be4a-20240107";
27+
var ReactVersion = "18.3.0-canary-f9dddcbbb-20240108";
2828

2929
// ATTENTION
3030
// When adding new symbols to this file,

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,4 +580,4 @@ exports.useSyncExternalStore = function (
580580
exports.useTransition = function () {
581581
return ReactCurrentDispatcher.current.useTransition();
582582
};
583-
exports.version = "18.3.0-canary-f1039be4a-20240107";
583+
exports.version = "18.3.0-canary-f9dddcbbb-20240108";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ exports.useSyncExternalStore = function (
576576
exports.useTransition = function () {
577577
return ReactCurrentDispatcher.current.useTransition();
578578
};
579-
exports.version = "18.3.0-canary-f1039be4a-20240107";
579+
exports.version = "18.3.0-canary-f9dddcbbb-20240108";
580580
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
581581
"function" ===
582582
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f1039be4a48384e7e4b0a87d4d92c48e900053b9
1+
f9dddcbbb1c0b73f974e78b9488927b778630682

0 commit comments

Comments
 (0)