Commit f1394aa
[vm] Fix unwinding through FutureIterable and FutureRecordN wait
Add awaiter-links leading from callbacks attached to
the original Futures to Completer produced by wait.
This requires changing representation of _FutureResult
slightly because we do not support annotating arbitrary
fields as awaiter-links only variables can be annotated
Thus we need to capture onReady callback in a the context of
closures passed to Future.then.
Fixes #59730
TEST=pkg/vm_service/test/pause_on_unhandled_exceptions_future_extensions_test.dart,runtime/tests/vm/dart/awaiter_stacks/async_stacks_test.dart
CoreLibraryReviewExempt: No API or significant implementation changes
Change-Id: I904b441b27c4e06f08b7ea7ba066a2fb03504ce6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401062
Commit-Queue: Slava Egorov <[email protected]>
Reviewed-by: Lasse Nielsen <[email protected]>1 parent 5de66cc commit f1394aa
File tree
3 files changed
+213
-29
lines changed- pkg/vm_service/test
- runtime/tests/vm/dart/awaiter_stacks
- sdk/lib/async
3 files changed
+213
-29
lines changedLines changed: 54 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 | + | |
Lines changed: 132 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
163 | 166 | | |
164 | 167 | | |
165 | 168 | | |
| |||
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
179 | | - | |
180 | | - | |
181 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
182 | 188 | | |
183 | 189 | | |
184 | 190 | | |
| |||
190 | 196 | | |
191 | 197 | | |
192 | 198 | | |
193 | | - | |
| 199 | + | |
194 | 200 | | |
195 | 201 | | |
196 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
197 | 229 | | |
198 | 230 | | |
199 | 231 | | |
| |||
207 | 239 | | |
208 | 240 | | |
209 | 241 | | |
210 | | - | |
211 | | - | |
212 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
213 | 247 | | |
214 | 248 | | |
215 | 249 | | |
| |||
259 | 293 | | |
260 | 294 | | |
261 | 295 | | |
| 296 | + | |
| 297 | + | |
262 | 298 | | |
263 | 299 | | |
264 | 300 | | |
| |||
762 | 798 | | |
763 | 799 | | |
764 | 800 | | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
765 | 883 | | |
766 | 884 | | |
767 | 885 | | |
| |||
831 | 949 | | |
832 | 950 | | |
833 | 951 | | |
834 | | - | |
| 952 | + | |
835 | 953 | | |
836 | 954 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
| 83 | + | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| |||
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
| 111 | + | |
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
| |||
133 | 138 | | |
134 | 139 | | |
135 | 140 | | |
| 141 | + | |
136 | 142 | | |
137 | 143 | | |
138 | 144 | | |
| |||
167 | 173 | | |
168 | 174 | | |
169 | 175 | | |
| 176 | + | |
170 | 177 | | |
171 | 178 | | |
172 | 179 | | |
| |||
223 | 230 | | |
224 | 231 | | |
225 | 232 | | |
| 233 | + | |
226 | 234 | | |
227 | 235 | | |
228 | 236 | | |
| |||
291 | 299 | | |
292 | 300 | | |
293 | 301 | | |
| 302 | + | |
294 | 303 | | |
295 | 304 | | |
296 | 305 | | |
| |||
365 | 374 | | |
366 | 375 | | |
367 | 376 | | |
| 377 | + | |
368 | 378 | | |
369 | 379 | | |
370 | 380 | | |
| |||
445 | 455 | | |
446 | 456 | | |
447 | 457 | | |
| 458 | + | |
448 | 459 | | |
449 | 460 | | |
450 | 461 | | |
| |||
596 | 607 | | |
597 | 608 | | |
598 | 609 | | |
| 610 | + | |
| 611 | + | |
599 | 612 | | |
600 | 613 | | |
601 | 614 | | |
| |||
604 | 617 | | |
605 | 618 | | |
606 | 619 | | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
| 620 | + | |
612 | 621 | | |
613 | 622 | | |
614 | 623 | | |
615 | 624 | | |
616 | 625 | | |
617 | 626 | | |
618 | 627 | | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
627 | 639 | | |
628 | 640 | | |
629 | 641 | | |
630 | 642 | | |
631 | 643 | | |
632 | 644 | | |
633 | 645 | | |
634 | | - | |
| 646 | + | |
635 | 647 | | |
636 | 648 | | |
637 | 649 | | |
| |||
644 | 656 | | |
645 | 657 | | |
646 | 658 | | |
647 | | - | |
| 659 | + | |
648 | 660 | | |
649 | 661 | | |
650 | 662 | | |
| |||
0 commit comments