Skip to content

Commit 1264bca

Browse files
committed
[Flight] Encode enclosing line/column numbers and use it to align the fake function (#33136)
Stacked on #33135. This encodes the line/column of the enclosing function as part of the stack traces. When that information is available. I adjusted the fake function code generation so that the beginning of the arrow function aligns with these as much as possible. This ensures that when the browser tries to look up the line/column of the enclosing function, such as for getting the function name, it gets the right one. If we can't get the enclosing line/column, then we encode it at the beginning of the file. This is likely to get a miss in the source map identifiers, which means that the function name gets extracted from the runtime name instead which is better. Another thing where this is used is the in the Performance Track. Ideally that would be fixed by https://issues.chromium.org/u/1/issues/415968771 but the enclosing information is useful for other things like the function name resolution anyway. We can also use this for the "View source for this element" in React DevTools. DiffTrain build for [4a70286](4a70286)
1 parent bd2fd37 commit 1264bca

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-0ff1d13b-20250507
1+
19.2.0-native-fb-4a702865-20250507

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<<5c4346d8860a0359461717b691edaa4d>>
10+
* @generated SignedSource<<e3421c1b910601339cb6e1b7a4ebcbbc>>
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-0ff1d13b-20250507";
407+
exports.version = "19.2.0-native-fb-4a702865-20250507";
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<<707166a381c50c506ff30be0d42243b8>>
10+
* @generated SignedSource<<eec1e2fe40d9636c573721db2deaff83>>
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-0ff1d13b-20250507";
206+
exports.version = "19.2.0-native-fb-4a702865-20250507";

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<<707166a381c50c506ff30be0d42243b8>>
10+
* @generated SignedSource<<eec1e2fe40d9636c573721db2deaff83>>
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-0ff1d13b-20250507";
206+
exports.version = "19.2.0-native-fb-4a702865-20250507";

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<<df89a3259c9efebae2ffafd98f677161>>
10+
* @generated SignedSource<<00e844f86af1d5010341db0b6b2e2313>>
1111
*/
1212

1313
/*
@@ -26951,11 +26951,11 @@ __DEV__ &&
2695126951
};
2695226952
(function () {
2695326953
var isomorphicReactPackageVersion = React.version;
26954-
if ("19.2.0-native-fb-0ff1d13b-20250507" !== isomorphicReactPackageVersion)
26954+
if ("19.2.0-native-fb-4a702865-20250507" !== isomorphicReactPackageVersion)
2695526955
throw Error(
2695626956
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2695726957
(isomorphicReactPackageVersion +
26958-
"\n - react-dom: 19.2.0-native-fb-0ff1d13b-20250507\nLearn more: https://react.dev/warnings/version-mismatch")
26958+
"\n - react-dom: 19.2.0-native-fb-4a702865-20250507\nLearn more: https://react.dev/warnings/version-mismatch")
2695926959
);
2696026960
})();
2696126961
("function" === typeof Map &&
@@ -26992,10 +26992,10 @@ __DEV__ &&
2699226992
!(function () {
2699326993
var internals = {
2699426994
bundleType: 1,
26995-
version: "19.2.0-native-fb-0ff1d13b-20250507",
26995+
version: "19.2.0-native-fb-4a702865-20250507",
2699626996
rendererPackageName: "react-dom",
2699726997
currentDispatcherRef: ReactSharedInternals,
26998-
reconcilerVersion: "19.2.0-native-fb-0ff1d13b-20250507"
26998+
reconcilerVersion: "19.2.0-native-fb-4a702865-20250507"
2699926999
};
2700027000
internals.overrideHookState = overrideHookState;
2700127001
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -27139,5 +27139,5 @@ __DEV__ &&
2713927139
listenToAllSupportedEvents(container);
2714027140
return new ReactDOMHydrationRoot(initialChildren);
2714127141
};
27142-
exports.version = "19.2.0-native-fb-0ff1d13b-20250507";
27142+
exports.version = "19.2.0-native-fb-4a702865-20250507";
2714327143
})();

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<<56459ad96ebd03435efa0e36bff27239>>
10+
* @generated SignedSource<<8c07e592447741b1345a345f9bdc0ffe>>
1111
*/
1212

1313
/*
@@ -17040,14 +17040,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1704017040
};
1704117041
var isomorphicReactPackageVersion$jscomp$inline_2009 = React.version;
1704217042
if (
17043-
"19.2.0-native-fb-0ff1d13b-20250507" !==
17043+
"19.2.0-native-fb-4a702865-20250507" !==
1704417044
isomorphicReactPackageVersion$jscomp$inline_2009
1704517045
)
1704617046
throw Error(
1704717047
formatProdErrorMessage(
1704817048
527,
1704917049
isomorphicReactPackageVersion$jscomp$inline_2009,
17050-
"19.2.0-native-fb-0ff1d13b-20250507"
17050+
"19.2.0-native-fb-4a702865-20250507"
1705117051
)
1705217052
);
1705317053
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17069,10 +17069,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1706917069
};
1707017070
var internals$jscomp$inline_2528 = {
1707117071
bundleType: 0,
17072-
version: "19.2.0-native-fb-0ff1d13b-20250507",
17072+
version: "19.2.0-native-fb-4a702865-20250507",
1707317073
rendererPackageName: "react-dom",
1707417074
currentDispatcherRef: ReactSharedInternals,
17075-
reconcilerVersion: "19.2.0-native-fb-0ff1d13b-20250507"
17075+
reconcilerVersion: "19.2.0-native-fb-4a702865-20250507"
1707617076
};
1707717077
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1707817078
var hook$jscomp$inline_2529 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17176,4 +17176,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1717617176
listenToAllSupportedEvents(container);
1717717177
return new ReactDOMHydrationRoot(initialChildren);
1717817178
};
17179-
exports.version = "19.2.0-native-fb-0ff1d13b-20250507";
17179+
exports.version = "19.2.0-native-fb-4a702865-20250507";

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<<af6b95394264ad1449a2ef174ca6ed5d>>
10+
* @generated SignedSource<<5bd38ede9798f5981361d6ce89995d36>>
1111
*/
1212

1313
/*
@@ -17750,14 +17750,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1775017750
};
1775117751
var isomorphicReactPackageVersion$jscomp$inline_2112 = React.version;
1775217752
if (
17753-
"19.2.0-native-fb-0ff1d13b-20250507" !==
17753+
"19.2.0-native-fb-4a702865-20250507" !==
1775417754
isomorphicReactPackageVersion$jscomp$inline_2112
1775517755
)
1775617756
throw Error(
1775717757
formatProdErrorMessage(
1775817758
527,
1775917759
isomorphicReactPackageVersion$jscomp$inline_2112,
17760-
"19.2.0-native-fb-0ff1d13b-20250507"
17760+
"19.2.0-native-fb-4a702865-20250507"
1776117761
)
1776217762
);
1776317763
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17779,10 +17779,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1777917779
};
1778017780
var internals$jscomp$inline_2119 = {
1778117781
bundleType: 0,
17782-
version: "19.2.0-native-fb-0ff1d13b-20250507",
17782+
version: "19.2.0-native-fb-4a702865-20250507",
1778317783
rendererPackageName: "react-dom",
1778417784
currentDispatcherRef: ReactSharedInternals,
17785-
reconcilerVersion: "19.2.0-native-fb-0ff1d13b-20250507",
17785+
reconcilerVersion: "19.2.0-native-fb-4a702865-20250507",
1778617786
getLaneLabelMap: function () {
1778717787
for (
1778817788
var map = new Map(), lane = 1, index$309 = 0;
@@ -17901,4 +17901,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1790117901
listenToAllSupportedEvents(container);
1790217902
return new ReactDOMHydrationRoot(initialChildren);
1790317903
};
17904-
exports.version = "19.2.0-native-fb-0ff1d13b-20250507";
17904+
exports.version = "19.2.0-native-fb-4a702865-20250507";

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<<bb5086906e4322d861d45b7a72edbd12>>
10+
* @generated SignedSource<<2a1c4de642e83319a810ad1e1f5a2329>>
1111
*/
1212

1313
/*
@@ -27012,11 +27012,11 @@ __DEV__ &&
2701227012
};
2701327013
(function () {
2701427014
var isomorphicReactPackageVersion = React.version;
27015-
if ("19.2.0-native-fb-0ff1d13b-20250507" !== isomorphicReactPackageVersion)
27015+
if ("19.2.0-native-fb-4a702865-20250507" !== isomorphicReactPackageVersion)
2701627016
throw Error(
2701727017
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2701827018
(isomorphicReactPackageVersion +
27019-
"\n - react-dom: 19.2.0-native-fb-0ff1d13b-20250507\nLearn more: https://react.dev/warnings/version-mismatch")
27019+
"\n - react-dom: 19.2.0-native-fb-4a702865-20250507\nLearn more: https://react.dev/warnings/version-mismatch")
2702027020
);
2702127021
})();
2702227022
("function" === typeof Map &&
@@ -27053,10 +27053,10 @@ __DEV__ &&
2705327053
!(function () {
2705427054
var internals = {
2705527055
bundleType: 1,
27056-
version: "19.2.0-native-fb-0ff1d13b-20250507",
27056+
version: "19.2.0-native-fb-4a702865-20250507",
2705727057
rendererPackageName: "react-dom",
2705827058
currentDispatcherRef: ReactSharedInternals,
27059-
reconcilerVersion: "19.2.0-native-fb-0ff1d13b-20250507"
27059+
reconcilerVersion: "19.2.0-native-fb-4a702865-20250507"
2706027060
};
2706127061
internals.overrideHookState = overrideHookState;
2706227062
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -27516,7 +27516,7 @@ __DEV__ &&
2751627516
exports.useFormStatus = function () {
2751727517
return resolveDispatcher().useHostTransitionStatus();
2751827518
};
27519-
exports.version = "19.2.0-native-fb-0ff1d13b-20250507";
27519+
exports.version = "19.2.0-native-fb-4a702865-20250507";
2752027520
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2752127521
"function" ===
2752227522
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<<a21934da56a82709f9b06f7612ffa22d>>
10+
* @generated SignedSource<<8c2f3359ab9d558694e15b00f7762b3a>>
1111
*/
1212

1313
/*
@@ -17051,14 +17051,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1705117051
};
1705217052
var isomorphicReactPackageVersion$jscomp$inline_2010 = React.version;
1705317053
if (
17054-
"19.2.0-native-fb-0ff1d13b-20250507" !==
17054+
"19.2.0-native-fb-4a702865-20250507" !==
1705517055
isomorphicReactPackageVersion$jscomp$inline_2010
1705617056
)
1705717057
throw Error(
1705817058
formatProdErrorMessage(
1705917059
527,
1706017060
isomorphicReactPackageVersion$jscomp$inline_2010,
17061-
"19.2.0-native-fb-0ff1d13b-20250507"
17061+
"19.2.0-native-fb-4a702865-20250507"
1706217062
)
1706317063
);
1706417064
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17080,10 +17080,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1708017080
};
1708117081
var internals$jscomp$inline_2531 = {
1708217082
bundleType: 0,
17083-
version: "19.2.0-native-fb-0ff1d13b-20250507",
17083+
version: "19.2.0-native-fb-4a702865-20250507",
1708417084
rendererPackageName: "react-dom",
1708517085
currentDispatcherRef: ReactSharedInternals,
17086-
reconcilerVersion: "19.2.0-native-fb-0ff1d13b-20250507"
17086+
reconcilerVersion: "19.2.0-native-fb-4a702865-20250507"
1708717087
};
1708817088
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1708917089
var hook$jscomp$inline_2532 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17341,4 +17341,4 @@ exports.useFormState = function (action, initialState, permalink) {
1734117341
exports.useFormStatus = function () {
1734217342
return ReactSharedInternals.H.useHostTransitionStatus();
1734317343
};
17344-
exports.version = "19.2.0-native-fb-0ff1d13b-20250507";
17344+
exports.version = "19.2.0-native-fb-4a702865-20250507";

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<<1f7297c88a070b96c62fd5a6fb3a9c5a>>
10+
* @generated SignedSource<<a6d7375b80550b7eed93adc80f4ee5a6>>
1111
*/
1212

1313
/*
@@ -17765,14 +17765,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1776517765
};
1776617766
var isomorphicReactPackageVersion$jscomp$inline_2113 = React.version;
1776717767
if (
17768-
"19.2.0-native-fb-0ff1d13b-20250507" !==
17768+
"19.2.0-native-fb-4a702865-20250507" !==
1776917769
isomorphicReactPackageVersion$jscomp$inline_2113
1777017770
)
1777117771
throw Error(
1777217772
formatProdErrorMessage(
1777317773
527,
1777417774
isomorphicReactPackageVersion$jscomp$inline_2113,
17775-
"19.2.0-native-fb-0ff1d13b-20250507"
17775+
"19.2.0-native-fb-4a702865-20250507"
1777617776
)
1777717777
);
1777817778
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17794,10 +17794,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1779417794
};
1779517795
var internals$jscomp$inline_2120 = {
1779617796
bundleType: 0,
17797-
version: "19.2.0-native-fb-0ff1d13b-20250507",
17797+
version: "19.2.0-native-fb-4a702865-20250507",
1779817798
rendererPackageName: "react-dom",
1779917799
currentDispatcherRef: ReactSharedInternals,
17800-
reconcilerVersion: "19.2.0-native-fb-0ff1d13b-20250507",
17800+
reconcilerVersion: "19.2.0-native-fb-4a702865-20250507",
1780117801
getLaneLabelMap: function () {
1780217802
for (
1780317803
var map = new Map(), lane = 1, index$309 = 0;
@@ -18070,7 +18070,7 @@ exports.useFormState = function (action, initialState, permalink) {
1807018070
exports.useFormStatus = function () {
1807118071
return ReactSharedInternals.H.useHostTransitionStatus();
1807218072
};
18073-
exports.version = "19.2.0-native-fb-0ff1d13b-20250507";
18073+
exports.version = "19.2.0-native-fb-4a702865-20250507";
1807418074
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1807518075
"function" ===
1807618076
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)