Commit 01eae20
[DevTools] Get source location from structured callsites in prepareStackTrace (#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 #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.1 parent 0e6781a commit 01eae20
File tree
3 files changed
+90
-15
lines changed3 files changed
+90
-15
lines changedLines changed: 12 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
5758 | 5759 | | |
5759 | 5760 | | |
5760 | 5761 | | |
5761 | | - | |
5762 | | - | |
5763 | | - | |
5764 | | - | |
5765 | | - | |
5766 | | - | |
5767 | | - | |
5768 | | - | |
| 5762 | + | |
| 5763 | + | |
| 5764 | + | |
| 5765 | + | |
5769 | 5766 | | |
| 5767 | + | |
| 5768 | + | |
5770 | 5769 | | |
5771 | 5770 | | |
5772 | 5771 | | |
| |||
5777 | 5776 | | |
5778 | 5777 | | |
5779 | 5778 | | |
5780 | | - | |
5781 | | - | |
5782 | | - | |
5783 | | - | |
| 5779 | + | |
5784 | 5780 | | |
5785 | 5781 | | |
5786 | 5782 | | |
5787 | 5783 | | |
5788 | 5784 | | |
5789 | 5785 | | |
5790 | 5786 | | |
5791 | | - | |
| 5787 | + | |
5792 | 5788 | | |
5793 | 5789 | | |
5794 | 5790 | | |
| |||
5801 | 5797 | | |
5802 | 5798 | | |
5803 | 5799 | | |
5804 | | - | |
| 5800 | + | |
| 5801 | + | |
| 5802 | + | |
5805 | 5803 | | |
5806 | 5804 | | |
5807 | 5805 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
Lines changed: 73 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
345 | 347 | | |
346 | 348 | | |
347 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
348 | 421 | | |
349 | 422 | | |
350 | 423 | | |
| |||
0 commit comments