Commit e534ebb
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
7 files changed
Lines changed: 9 additions & 9 deletions
File tree
- compiled-rn/facebook-fbsource/xplat/js
- RKJSModules/vendor
- react-test-renderer/cjs
- react/cjs
- react-native-github/Libraries/Renderer
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25733 | 25733 | | |
25734 | 25734 | | |
25735 | 25735 | | |
25736 | | - | |
| 25736 | + | |
25737 | 25737 | | |
25738 | 25738 | | |
25739 | 25739 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9173 | 9173 | | |
9174 | 9174 | | |
9175 | 9175 | | |
9176 | | - | |
| 9176 | + | |
9177 | 9177 | | |
9178 | 9178 | | |
9179 | 9179 | | |
| |||
9204 | 9204 | | |
9205 | 9205 | | |
9206 | 9206 | | |
9207 | | - | |
| 9207 | + | |
9208 | 9208 | | |
9209 | 9209 | | |
9210 | 9210 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9601 | 9601 | | |
9602 | 9602 | | |
9603 | 9603 | | |
9604 | | - | |
| 9604 | + | |
9605 | 9605 | | |
9606 | 9606 | | |
9607 | 9607 | | |
| |||
9632 | 9632 | | |
9633 | 9633 | | |
9634 | 9634 | | |
9635 | | - | |
| 9635 | + | |
9636 | 9636 | | |
9637 | 9637 | | |
9638 | 9638 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
| 601 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
| 597 | + | |
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments