Commit f65ac7b
authored
[DevTools] Make function inspection instant (#30786)
I noticed that there is a delay due to the inspection being split into
one part that gets the attribute and another eval that does the
inspection. This is a bit hacky and uses temporary global names that are
leaky. The timeout was presumably to ensure that the first step had
fully propagated but it's slow. As we've learned, it can be throttled,
and it isn't a guarantee either way.
Instead, we can just consolidate these into a single operation that
by-passes the bridge and goes straight to the renderer interface from
the eval.
I did the same for the viewElementSource helper even though that's not
currently in use since #28471 but I think we probably should return to
that technique when it's available since it's more reliable than the
throw - at least in Chrome. I'm not sure about the status of React
Native here. In Firefox, inspecting a function with source maps doesn't
seem to work. It doesn't jump to original code.1 parent 1b74782 commit f65ac7b
6 files changed
Lines changed: 90 additions & 64 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 118 | + | |
129 | 119 | | |
130 | 120 | | |
131 | 121 | | |
| |||
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | 223 | | |
226 | 224 | | |
227 | 225 | | |
| |||
816 | 814 | | |
817 | 815 | | |
818 | 816 | | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | 817 | | |
838 | 818 | | |
839 | 819 | | |
| |||
Lines changed: 15 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3874 | 3874 | | |
3875 | 3875 | | |
3876 | 3876 | | |
3877 | | - | |
| 3877 | + | |
3878 | 3878 | | |
3879 | 3879 | | |
3880 | | - | |
| 3880 | + | |
3881 | 3881 | | |
3882 | | - | |
| 3882 | + | |
3883 | 3883 | | |
3884 | 3884 | | |
3885 | 3885 | | |
3886 | 3886 | | |
| 3887 | + | |
3887 | 3888 | | |
3888 | 3889 | | |
3889 | | - | |
| 3890 | + | |
3890 | 3891 | | |
3891 | 3892 | | |
3892 | 3893 | | |
3893 | | - | |
| 3894 | + | |
3894 | 3895 | | |
3895 | 3896 | | |
3896 | 3897 | | |
3897 | | - | |
| 3898 | + | |
3898 | 3899 | | |
3899 | 3900 | | |
3900 | 3901 | | |
| |||
3906 | 3907 | | |
3907 | 3908 | | |
3908 | 3909 | | |
3909 | | - | |
3910 | | - | |
| 3910 | + | |
3911 | 3911 | | |
3912 | | - | |
3913 | | - | |
| 3912 | + | |
3914 | 3913 | | |
3915 | 3914 | | |
3916 | | - | |
3917 | | - | |
3918 | | - | |
3919 | | - | |
3920 | | - | |
| 3915 | + | |
| 3916 | + | |
| 3917 | + | |
3921 | 3918 | | |
3922 | | - | |
3923 | | - | |
| 3919 | + | |
3924 | 3920 | | |
3925 | 3921 | | |
3926 | 3922 | | |
| |||
5727 | 5723 | | |
5728 | 5724 | | |
5729 | 5725 | | |
5730 | | - | |
5731 | | - | |
| 5726 | + | |
| 5727 | + | |
5732 | 5728 | | |
5733 | 5729 | | |
5734 | 5730 | | |
| |||
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
907 | 907 | | |
908 | 908 | | |
909 | 909 | | |
910 | | - | |
| 910 | + | |
911 | 911 | | |
912 | 912 | | |
913 | | - | |
| 913 | + | |
914 | 914 | | |
915 | 915 | | |
916 | | - | |
| 916 | + | |
917 | 917 | | |
| 918 | + | |
918 | 919 | | |
919 | 920 | | |
920 | | - | |
| 921 | + | |
921 | 922 | | |
922 | 923 | | |
923 | 924 | | |
924 | | - | |
| 925 | + | |
925 | 926 | | |
926 | 927 | | |
927 | 928 | | |
928 | 929 | | |
929 | 930 | | |
930 | | - | |
| 931 | + | |
931 | 932 | | |
932 | 933 | | |
933 | | - | |
| 934 | + | |
934 | 935 | | |
935 | 936 | | |
936 | 937 | | |
| |||
1141 | 1142 | | |
1142 | 1143 | | |
1143 | 1144 | | |
1144 | | - | |
1145 | | - | |
| 1145 | + | |
| 1146 | + | |
1146 | 1147 | | |
1147 | 1148 | | |
1148 | 1149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | | - | |
| 397 | + | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
401 | | - | |
| 400 | + | |
| 401 | + | |
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| |||
0 commit comments