You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make unwinding follow the awaiter link attached to the timeout handler,
which allows it to continue past the asynchronous gap into the
corresponding listeners. This significantly improves the stack trace:
for example a timing out `await Socket.connect()` now produces:
SocketException: Connection timed out, ...
_NativeSocket.connect.<anonymous closure>.<anonymous closure>
_RootZone.run (dart:async/zone.dart:1655:54)
Future.timeout.<anonymous closure>
<asynchronous suspension>
_RawSocket.connect.<anonymous closure>
<asynchronous suspension>
Socket._connect.<anonymous closure>
<asynchronous suspension>
main
<asynchronous suspension>
Where without this change it produced:
SocketException: Connection timed out, ...
_NativeSocket.connect.<anonymous closure>.<anonymous closure>
_RootZone.run
Future.timeout.<anonymous closure>
Timer._createTimer.<anonymous closure>
_Timer._runTimers
_Timer._handleMessage
_RawReceivePort._handleMessage
Which is much less informative.
TEST=vm/dart/awaiter_stacks
Fixes#56431
Change-Id: If4798e9e216ed88480a2b2b91ad6fa13dcb14ca4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380982
Reviewed-by: Sigmund Cherem <[email protected]>
Reviewed-by: Martin Kustermann <[email protected]>
Commit-Queue: Slava Egorov <[email protected]>
Reviewed-by: Lasse Nielsen <[email protected]>
0 commit comments