Skip to content

Commit 24a28d2

Browse files
committed
[DevTools] Get source location from structured callsites in prepareStackTrace (facebook#33143)
When we get the source location for "View source for this element" we should be using the enclosing function of the callsite of the child. So that we don't just point to some random line within the component. This is similar to the technique in facebook#33136. This technique is now really better than the fake throw technique, when available. So I now favor the owner technique. The only problem it's only available in DEV and only if it has a child that's owned (and not filtered). We could implement this same technique for the error that's thrown in the fake throwing solution. However, we really shouldn't need that at all because for client components we should be able to call `inspect(fn)` at least in Chrome which is even better. DiffTrain build for [997c7bc](facebook@997c7bc)
1 parent f9fb754 commit 24a28d2

24 files changed

+87
-87
lines changed

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.2.0-native-fb-2bcf06b6-20250512
1+
19.2.0-native-fb-997c7bc9-20250513

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<eeb0b6a1761a5cf9fb45be551ad7a530>>
10+
* @generated SignedSource<<0eb1c939f2a48a302b150ffd5ba2a699>>
1111
*/
1212

1313
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
404404
exports.useFormStatus = function () {
405405
return resolveDispatcher().useHostTransitionStatus();
406406
};
407-
exports.version = "19.2.0-native-fb-2bcf06b6-20250512";
407+
exports.version = "19.2.0-native-fb-997c7bc9-20250513";
408408
})();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<631168e808f7a32d5cdbeb6885e60aab>>
10+
* @generated SignedSource<<70fc5e6f78933604f9d0f366a0529fac>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.2.0-native-fb-2bcf06b6-20250512";
206+
exports.version = "19.2.0-native-fb-997c7bc9-20250513";

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<631168e808f7a32d5cdbeb6885e60aab>>
10+
* @generated SignedSource<<70fc5e6f78933604f9d0f366a0529fac>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.2.0-native-fb-2bcf06b6-20250512";
206+
exports.version = "19.2.0-native-fb-997c7bc9-20250513";

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<977c5236fc9323e6fc00dbfbf7e75f10>>
10+
* @generated SignedSource<<540483d236be7d3946d88c26277f3c7f>>
1111
*/
1212

1313
/*
@@ -26958,11 +26958,11 @@ __DEV__ &&
2695826958
};
2695926959
(function () {
2696026960
var isomorphicReactPackageVersion = React.version;
26961-
if ("19.2.0-native-fb-2bcf06b6-20250512" !== isomorphicReactPackageVersion)
26961+
if ("19.2.0-native-fb-997c7bc9-20250513" !== isomorphicReactPackageVersion)
2696226962
throw Error(
2696326963
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2696426964
(isomorphicReactPackageVersion +
26965-
"\n - react-dom: 19.2.0-native-fb-2bcf06b6-20250512\nLearn more: https://react.dev/warnings/version-mismatch")
26965+
"\n - react-dom: 19.2.0-native-fb-997c7bc9-20250513\nLearn more: https://react.dev/warnings/version-mismatch")
2696626966
);
2696726967
})();
2696826968
("function" === typeof Map &&
@@ -26999,10 +26999,10 @@ __DEV__ &&
2699926999
!(function () {
2700027000
var internals = {
2700127001
bundleType: 1,
27002-
version: "19.2.0-native-fb-2bcf06b6-20250512",
27002+
version: "19.2.0-native-fb-997c7bc9-20250513",
2700327003
rendererPackageName: "react-dom",
2700427004
currentDispatcherRef: ReactSharedInternals,
27005-
reconcilerVersion: "19.2.0-native-fb-2bcf06b6-20250512"
27005+
reconcilerVersion: "19.2.0-native-fb-997c7bc9-20250513"
2700627006
};
2700727007
internals.overrideHookState = overrideHookState;
2700827008
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -27140,5 +27140,5 @@ __DEV__ &&
2714027140
listenToAllSupportedEvents(container);
2714127141
return new ReactDOMHydrationRoot(initialChildren);
2714227142
};
27143-
exports.version = "19.2.0-native-fb-2bcf06b6-20250512";
27143+
exports.version = "19.2.0-native-fb-997c7bc9-20250513";
2714427144
})();

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<2e4a940012c6da410eddff70b3c58a8d>>
10+
* @generated SignedSource<<d2ac2c6fc1d7b173066eae37c84b37cb>>
1111
*/
1212

1313
/*
@@ -17049,14 +17049,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1704917049
};
1705017050
var isomorphicReactPackageVersion$jscomp$inline_2015 = React.version;
1705117051
if (
17052-
"19.2.0-native-fb-2bcf06b6-20250512" !==
17052+
"19.2.0-native-fb-997c7bc9-20250513" !==
1705317053
isomorphicReactPackageVersion$jscomp$inline_2015
1705417054
)
1705517055
throw Error(
1705617056
formatProdErrorMessage(
1705717057
527,
1705817058
isomorphicReactPackageVersion$jscomp$inline_2015,
17059-
"19.2.0-native-fb-2bcf06b6-20250512"
17059+
"19.2.0-native-fb-997c7bc9-20250513"
1706017060
)
1706117061
);
1706217062
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17078,10 +17078,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1707817078
};
1707917079
var internals$jscomp$inline_2534 = {
1708017080
bundleType: 0,
17081-
version: "19.2.0-native-fb-2bcf06b6-20250512",
17081+
version: "19.2.0-native-fb-997c7bc9-20250513",
1708217082
rendererPackageName: "react-dom",
1708317083
currentDispatcherRef: ReactSharedInternals,
17084-
reconcilerVersion: "19.2.0-native-fb-2bcf06b6-20250512"
17084+
reconcilerVersion: "19.2.0-native-fb-997c7bc9-20250513"
1708517085
};
1708617086
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1708717087
var hook$jscomp$inline_2535 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17179,4 +17179,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1717917179
listenToAllSupportedEvents(container);
1718017180
return new ReactDOMHydrationRoot(initialChildren);
1718117181
};
17182-
exports.version = "19.2.0-native-fb-2bcf06b6-20250512";
17182+
exports.version = "19.2.0-native-fb-997c7bc9-20250513";

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<4cf19c80dbed4f0bb4597661c5b62bb5>>
10+
* @generated SignedSource<<3fb4670193e95757eac18d243b3931bc>>
1111
*/
1212

1313
/*
@@ -17759,14 +17759,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1775917759
};
1776017760
var isomorphicReactPackageVersion$jscomp$inline_2118 = React.version;
1776117761
if (
17762-
"19.2.0-native-fb-2bcf06b6-20250512" !==
17762+
"19.2.0-native-fb-997c7bc9-20250513" !==
1776317763
isomorphicReactPackageVersion$jscomp$inline_2118
1776417764
)
1776517765
throw Error(
1776617766
formatProdErrorMessage(
1776717767
527,
1776817768
isomorphicReactPackageVersion$jscomp$inline_2118,
17769-
"19.2.0-native-fb-2bcf06b6-20250512"
17769+
"19.2.0-native-fb-997c7bc9-20250513"
1777017770
)
1777117771
);
1777217772
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17788,10 +17788,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1778817788
};
1778917789
var internals$jscomp$inline_2125 = {
1779017790
bundleType: 0,
17791-
version: "19.2.0-native-fb-2bcf06b6-20250512",
17791+
version: "19.2.0-native-fb-997c7bc9-20250513",
1779217792
rendererPackageName: "react-dom",
1779317793
currentDispatcherRef: ReactSharedInternals,
17794-
reconcilerVersion: "19.2.0-native-fb-2bcf06b6-20250512",
17794+
reconcilerVersion: "19.2.0-native-fb-997c7bc9-20250513",
1779517795
getLaneLabelMap: function () {
1779617796
for (
1779717797
var map = new Map(), lane = 1, index$313 = 0;
@@ -17904,4 +17904,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1790417904
listenToAllSupportedEvents(container);
1790517905
return new ReactDOMHydrationRoot(initialChildren);
1790617906
};
17907-
exports.version = "19.2.0-native-fb-2bcf06b6-20250512";
17907+
exports.version = "19.2.0-native-fb-997c7bc9-20250513";

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<49ef76310a2ed5cbb71a27dd90f3661c>>
10+
* @generated SignedSource<<2ba3957c3697a6e30977e46a05e363aa>>
1111
*/
1212

1313
/*
@@ -27014,11 +27014,11 @@ __DEV__ &&
2701427014
};
2701527015
(function () {
2701627016
var isomorphicReactPackageVersion = React.version;
27017-
if ("19.2.0-native-fb-2bcf06b6-20250512" !== isomorphicReactPackageVersion)
27017+
if ("19.2.0-native-fb-997c7bc9-20250513" !== isomorphicReactPackageVersion)
2701827018
throw Error(
2701927019
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2702027020
(isomorphicReactPackageVersion +
27021-
"\n - react-dom: 19.2.0-native-fb-2bcf06b6-20250512\nLearn more: https://react.dev/warnings/version-mismatch")
27021+
"\n - react-dom: 19.2.0-native-fb-997c7bc9-20250513\nLearn more: https://react.dev/warnings/version-mismatch")
2702227022
);
2702327023
})();
2702427024
("function" === typeof Map &&
@@ -27055,10 +27055,10 @@ __DEV__ &&
2705527055
!(function () {
2705627056
var internals = {
2705727057
bundleType: 1,
27058-
version: "19.2.0-native-fb-2bcf06b6-20250512",
27058+
version: "19.2.0-native-fb-997c7bc9-20250513",
2705927059
rendererPackageName: "react-dom",
2706027060
currentDispatcherRef: ReactSharedInternals,
27061-
reconcilerVersion: "19.2.0-native-fb-2bcf06b6-20250512"
27061+
reconcilerVersion: "19.2.0-native-fb-997c7bc9-20250513"
2706227062
};
2706327063
internals.overrideHookState = overrideHookState;
2706427064
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -27512,7 +27512,7 @@ __DEV__ &&
2751227512
exports.useFormStatus = function () {
2751327513
return resolveDispatcher().useHostTransitionStatus();
2751427514
};
27515-
exports.version = "19.2.0-native-fb-2bcf06b6-20250512";
27515+
exports.version = "19.2.0-native-fb-997c7bc9-20250513";
2751627516
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2751727517
"function" ===
2751827518
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<9f1381d8e760bb899530223f9a6efbad>>
10+
* @generated SignedSource<<01a26543d8619d796e9f882a52d84b68>>
1111
*/
1212

1313
/*
@@ -17060,14 +17060,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1706017060
};
1706117061
var isomorphicReactPackageVersion$jscomp$inline_2016 = React.version;
1706217062
if (
17063-
"19.2.0-native-fb-2bcf06b6-20250512" !==
17063+
"19.2.0-native-fb-997c7bc9-20250513" !==
1706417064
isomorphicReactPackageVersion$jscomp$inline_2016
1706517065
)
1706617066
throw Error(
1706717067
formatProdErrorMessage(
1706817068
527,
1706917069
isomorphicReactPackageVersion$jscomp$inline_2016,
17070-
"19.2.0-native-fb-2bcf06b6-20250512"
17070+
"19.2.0-native-fb-997c7bc9-20250513"
1707117071
)
1707217072
);
1707317073
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17089,10 +17089,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1708917089
};
1709017090
var internals$jscomp$inline_2537 = {
1709117091
bundleType: 0,
17092-
version: "19.2.0-native-fb-2bcf06b6-20250512",
17092+
version: "19.2.0-native-fb-997c7bc9-20250513",
1709317093
rendererPackageName: "react-dom",
1709417094
currentDispatcherRef: ReactSharedInternals,
17095-
reconcilerVersion: "19.2.0-native-fb-2bcf06b6-20250512"
17095+
reconcilerVersion: "19.2.0-native-fb-997c7bc9-20250513"
1709617096
};
1709717097
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1709817098
var hook$jscomp$inline_2538 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17343,4 +17343,4 @@ exports.useFormState = function (action, initialState, permalink) {
1734317343
exports.useFormStatus = function () {
1734417344
return ReactSharedInternals.H.useHostTransitionStatus();
1734517345
};
17346-
exports.version = "19.2.0-native-fb-2bcf06b6-20250512";
17346+
exports.version = "19.2.0-native-fb-997c7bc9-20250513";

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<b9c654e8e31bfb9e04a4c87fff6b8d50>>
10+
* @generated SignedSource<<65e0e613df6e44c2e47255548d9ad495>>
1111
*/
1212

1313
/*
@@ -17774,14 +17774,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1777417774
};
1777517775
var isomorphicReactPackageVersion$jscomp$inline_2119 = React.version;
1777617776
if (
17777-
"19.2.0-native-fb-2bcf06b6-20250512" !==
17777+
"19.2.0-native-fb-997c7bc9-20250513" !==
1777817778
isomorphicReactPackageVersion$jscomp$inline_2119
1777917779
)
1778017780
throw Error(
1778117781
formatProdErrorMessage(
1778217782
527,
1778317783
isomorphicReactPackageVersion$jscomp$inline_2119,
17784-
"19.2.0-native-fb-2bcf06b6-20250512"
17784+
"19.2.0-native-fb-997c7bc9-20250513"
1778517785
)
1778617786
);
1778717787
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17803,10 +17803,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1780317803
};
1780417804
var internals$jscomp$inline_2126 = {
1780517805
bundleType: 0,
17806-
version: "19.2.0-native-fb-2bcf06b6-20250512",
17806+
version: "19.2.0-native-fb-997c7bc9-20250513",
1780717807
rendererPackageName: "react-dom",
1780817808
currentDispatcherRef: ReactSharedInternals,
17809-
reconcilerVersion: "19.2.0-native-fb-2bcf06b6-20250512",
17809+
reconcilerVersion: "19.2.0-native-fb-997c7bc9-20250513",
1781017810
getLaneLabelMap: function () {
1781117811
for (
1781217812
var map = new Map(), lane = 1, index$313 = 0;
@@ -18072,7 +18072,7 @@ exports.useFormState = function (action, initialState, permalink) {
1807218072
exports.useFormStatus = function () {
1807318073
return ReactSharedInternals.H.useHostTransitionStatus();
1807418074
};
18075-
exports.version = "19.2.0-native-fb-2bcf06b6-20250512";
18075+
exports.version = "19.2.0-native-fb-997c7bc9-20250513";
1807618076
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1807718077
"function" ===
1807818078
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)