refactor[devtools]: lazily define source for fiber based on component stacks (#28351)

`_debugSource` was removed in
https://github.com/facebook/react/pull/28265.

This PR migrates DevTools to define `source` for Fiber based on
component stacks. This will be done lazily for inspected elements, once
user clicks on the element in the tree.

`DevToolsComponentStackFrame.js` was just copy-pasted from the
implementation in `ReactComponentStackFrame`.

Symbolication part is done in
https://github.com/facebook/react/pull/28471 and stacked on this commit.

DiffTrain build for commit https://github.com/facebook/react/commit/61bd00498d2a6e23885bac42f3aeb0e02cadb8eb.
This commit is contained in:
hoxyq
2024-03-05 12:15:20 +00:00
parent 35a4e339cf
commit 33cc5224d4
7 changed files with 9 additions and 9 deletions
@@ -25733,7 +25733,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "18.3.0-canary-aa4eae6b9-20240305";
var ReactVersion = "18.3.0-canary-61bd00498-20240305";
// Might add PROFILE later.
@@ -9173,7 +9173,7 @@ var devToolsConfig$jscomp$inline_1014 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-aa4eae6b9-20240305",
version: "18.3.0-canary-61bd00498-20240305",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1195 = {
@@ -9204,7 +9204,7 @@ var internals$jscomp$inline_1195 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-aa4eae6b9-20240305"
reconcilerVersion: "18.3.0-canary-61bd00498-20240305"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1196 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9601,7 +9601,7 @@ var devToolsConfig$jscomp$inline_1056 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-aa4eae6b9-20240305",
version: "18.3.0-canary-61bd00498-20240305",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1236 = {
@@ -9632,7 +9632,7 @@ var internals$jscomp$inline_1236 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-aa4eae6b9-20240305"
reconcilerVersion: "18.3.0-canary-61bd00498-20240305"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1237 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -26,7 +26,7 @@ if (__DEV__) {
}
var dynamicFlags = require("ReactNativeInternalFeatureFlags");
var ReactVersion = "18.3.0-canary-aa4eae6b9-20240305";
var ReactVersion = "18.3.0-canary-61bd00498-20240305";
// ATTENTION
// When adding new symbols to this file,
@@ -598,4 +598,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-aa4eae6b9-20240305";
exports.version = "18.3.0-canary-61bd00498-20240305";
@@ -594,7 +594,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-aa4eae6b9-20240305";
exports.version = "18.3.0-canary-61bd00498-20240305";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
aa4eae6b99a6081afabf180d02fa0a8b0cb1b3ab
61bd00498d2a6e23885bac42f3aeb0e02cadb8eb