Skip to content

Commit e534ebb

Browse files
committed
feat[devtools]: symbolicate source for inspected element (#28471)
Stacked on #28351, please review only the last commit. Top-level description of the approach: 1. Once user selects an element from the tree, frontend asks backend to return the inspected element, this is where we simulate an error happening in `render` function of the component and then we parse the error stack. As an improvement, we should probably migrate from custom implementation of error stack parser to `error-stack-parser` from npm. 2. When frontend receives the inspected element and this object is being propagated, we create a Promise for symbolicated source, which is then passed down to all components, which are using `source`. 3. These components use `use` hook for this promise and are wrapped in Suspense. Caching: 1. For browser extension, we cache Promises based on requested resource + key + column, also added use of `chrome.devtools.inspectedWindow.getResource` API. 2. For standalone case (RN), we cache based on requested resource url, we cache the content of it. DiffTrain build for commit e528728.
1 parent 33cc522 commit e534ebb

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
@@ -25733,7 +25733,7 @@ if (__DEV__) {
2573325733
return root;
2573425734
}
2573525735

25736-
var ReactVersion = "18.3.0-canary-61bd00498-20240305";
25736+
var ReactVersion = "18.3.0-canary-e5287287a-20240305";
2573725737

2573825738
// Might add PROFILE later.
2573925739

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
@@ -9173,7 +9173,7 @@ var devToolsConfig$jscomp$inline_1014 = {
91739173
throw Error("TestRenderer does not support findFiberByHostInstance()");
91749174
},
91759175
bundleType: 0,
9176-
version: "18.3.0-canary-61bd00498-20240305",
9176+
version: "18.3.0-canary-e5287287a-20240305",
91779177
rendererPackageName: "react-test-renderer"
91789178
};
91799179
var internals$jscomp$inline_1195 = {
@@ -9204,7 +9204,7 @@ var internals$jscomp$inline_1195 = {
92049204
scheduleRoot: null,
92059205
setRefreshHandler: null,
92069206
getCurrentFiber: null,
9207-
reconcilerVersion: "18.3.0-canary-61bd00498-20240305"
9207+
reconcilerVersion: "18.3.0-canary-e5287287a-20240305"
92089208
};
92099209
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
92109210
var hook$jscomp$inline_1196 = __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
@@ -9601,7 +9601,7 @@ var devToolsConfig$jscomp$inline_1056 = {
96019601
throw Error("TestRenderer does not support findFiberByHostInstance()");
96029602
},
96039603
bundleType: 0,
9604-
version: "18.3.0-canary-61bd00498-20240305",
9604+
version: "18.3.0-canary-e5287287a-20240305",
96059605
rendererPackageName: "react-test-renderer"
96069606
};
96079607
var internals$jscomp$inline_1236 = {
@@ -9632,7 +9632,7 @@ var internals$jscomp$inline_1236 = {
96329632
scheduleRoot: null,
96339633
setRefreshHandler: null,
96349634
getCurrentFiber: null,
9635-
reconcilerVersion: "18.3.0-canary-61bd00498-20240305"
9635+
reconcilerVersion: "18.3.0-canary-e5287287a-20240305"
96369636
};
96379637
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
96389638
var hook$jscomp$inline_1237 = __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
@@ -26,7 +26,7 @@ if (__DEV__) {
2626
}
2727
var dynamicFlags = require("ReactNativeInternalFeatureFlags");
2828

29-
var ReactVersion = "18.3.0-canary-61bd00498-20240305";
29+
var ReactVersion = "18.3.0-canary-e5287287a-20240305";
3030

3131
// ATTENTION
3232
// 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
@@ -598,4 +598,4 @@ exports.useSyncExternalStore = function (
598598
exports.useTransition = function () {
599599
return ReactCurrentDispatcher.current.useTransition();
600600
};
601-
exports.version = "18.3.0-canary-61bd00498-20240305";
601+
exports.version = "18.3.0-canary-e5287287a-20240305";

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
@@ -594,7 +594,7 @@ exports.useSyncExternalStore = function (
594594
exports.useTransition = function () {
595595
return ReactCurrentDispatcher.current.useTransition();
596596
};
597-
exports.version = "18.3.0-canary-61bd00498-20240305";
597+
exports.version = "18.3.0-canary-e5287287a-20240305";
598598
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
599599
"function" ===
600600
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
61bd00498d2a6e23885bac42f3aeb0e02cadb8eb
1+
e5287287aacd3c51d24e223651b7f38ece584c49

0 commit comments

Comments
 (0)