-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vm] Improve asynchronous unwinding through Stream methods
This CL adds @pragma('vm:awaiter-link') in various places in Stream implementation to facilitate unwinding and expands async unwinding logic with more information about Stream internals. At the same time be more conservative when checking if an exception thrown from async method handled: failing to unwind the stack fully creates situations when we incorrectly report caught exceptions as uncaught, which frustrates users. To distinguish stream subscriptions with and without error handlers we add a state bit. Otherwise, it looks like all subscriptions have error handlers because if no error handler is installed we eagerly install error handler forwarding the error to `Zone.handleUncaughtError`. Fixes #53334 Fixes #54788 Fixes #47985 TEST=runtime/vm/dart/awaiter_stacks/stream_methods_test.dart,pkg/vm_service/test/pause_on_unhandled_async_exceptions6_test.dart,pkg/vm_service/test/pause_on_unhandled_async_exceptions7_test.dart CoreLibraryReviewExempt: No behavioral change. Async changes reviewed by lrhn@ Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-dwarf-linux-product-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try Change-Id: Ic51f926867092dd0adbe801b753f57c357c7ace2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322720 Reviewed-by: Alexander Markov <alexmarkov@google.com> Reviewed-by: Lasse Nielsen <lrn@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Slava Egorov <vegorov@google.com>
- Loading branch information
Showing
14 changed files
with
2,248 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.