Skip to content

Commit 2dd6caa

Browse files
committed
[Fizz] Reset error component stack and fix error messages (#27456)
The way we collect component stacks right now are pretty fragile. We expect that we'll call captureBoundaryErrorDetailsDev whenever an error happens. That resets lastBoundaryErrorComponentStackDev to null but if we don't, it just lingers and we don't set it to anything new then which leaks the previous component stack into the next time we have an error. So we need to reset it in a bunch of places. This is still broken with erroredReplay because it has the inverse problem that abortRemainingReplayNodes can call captureBoundaryErrorDetailsDev more than one time. So the second boundary won't get a stack. We probably should try to figure out an alternative way to carry along the stack. Perhaps WeakMap keyed by the error object. This also fixes an issue where we weren't invoking the onShellReady event if we error a replay. That event is a bit weird for resuming because we're probably really supposed to just invoke it immediately if we have already flushed the shell in the prerender which is always atm. Right now, it gets invoked later than necessary because you could have a resumed hole ready before a sibling in the shell is ready and that's blocked. DiffTrain build for commit 0fba3ec.
1 parent 963258f commit 2dd6caa

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
@@ -24772,7 +24772,7 @@ function createFiberRoot(
2477224772
return root;
2477324773
}
2477424774

24775-
var ReactVersion = "18.3.0-canary-6f1324395-20231004";
24775+
var ReactVersion = "18.3.0-canary-0fba3ecf7-20231004";
2477624776

2477724777
// Might add PROFILE later.
2477824778

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
@@ -8978,7 +8978,7 @@ var devToolsConfig$jscomp$inline_998 = {
89788978
throw Error("TestRenderer does not support findFiberByHostInstance()");
89798979
},
89808980
bundleType: 0,
8981-
version: "18.3.0-canary-6f1324395-20231004",
8981+
version: "18.3.0-canary-0fba3ecf7-20231004",
89828982
rendererPackageName: "react-test-renderer"
89838983
};
89848984
var internals$jscomp$inline_1191 = {
@@ -9009,7 +9009,7 @@ var internals$jscomp$inline_1191 = {
90099009
scheduleRoot: null,
90109010
setRefreshHandler: null,
90119011
getCurrentFiber: null,
9012-
reconcilerVersion: "18.3.0-canary-6f1324395-20231004"
9012+
reconcilerVersion: "18.3.0-canary-0fba3ecf7-20231004"
90139013
};
90149014
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
90159015
var hook$jscomp$inline_1192 = __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
@@ -9404,7 +9404,7 @@ var devToolsConfig$jscomp$inline_1040 = {
94049404
throw Error("TestRenderer does not support findFiberByHostInstance()");
94059405
},
94069406
bundleType: 0,
9407-
version: "18.3.0-canary-6f1324395-20231004",
9407+
version: "18.3.0-canary-0fba3ecf7-20231004",
94089408
rendererPackageName: "react-test-renderer"
94099409
};
94109410
var internals$jscomp$inline_1232 = {
@@ -9435,7 +9435,7 @@ var internals$jscomp$inline_1232 = {
94359435
scheduleRoot: null,
94369436
setRefreshHandler: null,
94379437
getCurrentFiber: null,
9438-
reconcilerVersion: "18.3.0-canary-6f1324395-20231004"
9438+
reconcilerVersion: "18.3.0-canary-0fba3ecf7-20231004"
94399439
};
94409440
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
94419441
var hook$jscomp$inline_1233 = __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
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-canary-6f1324395-20231004";
30+
var ReactVersion = "18.3.0-canary-0fba3ecf7-20231004";
3131

3232
// ATTENTION
3333
// 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
@@ -616,4 +616,4 @@ exports.useSyncExternalStore = function (
616616
exports.useTransition = function () {
617617
return ReactCurrentDispatcher.current.useTransition();
618618
};
619-
exports.version = "18.3.0-canary-6f1324395-20231004";
619+
exports.version = "18.3.0-canary-0fba3ecf7-20231004";

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
@@ -619,7 +619,7 @@ exports.useSyncExternalStore = function (
619619
exports.useTransition = function () {
620620
return ReactCurrentDispatcher.current.useTransition();
621621
};
622-
exports.version = "18.3.0-canary-6f1324395-20231004";
622+
exports.version = "18.3.0-canary-0fba3ecf7-20231004";
623623

624624
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
625625
if (
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6f132439578ee11e04b41a278df51c52b0dc8563
1+
0fba3ecf73900a1b54ed6d3b0617462ac92d2fef

0 commit comments

Comments
 (0)