dart-sdk/tests/lib
Lasse R.H. Nielsen b06a34fc5a Don't allow completing a _Future with itself.
This never worked. It was silently accepted, at least if the future had no listeners, then any later attempt to use the future would cause a stack overflow or other impossible results.

Moves some `_Future._complete` call out of try-catch.
The `_complete` shouldn't throw (but before this fix it could).
Moving them out of the `try`/`catch` makes such errors be reported
as unhandled, instead of catching them and trying to complete the same
future again with an error, when it's possibly in an inconsistent state.

Fixes #43662.
Based on https://github.com/dart-lang/sdk/issues/43662#issuecomment-2058870247

CoreLibraryReviewExempt: No response.
Bug: http://dartbug.com/43662
Change-Id: I96a4f01bcd5b6cee93bba267299852569a9b905c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363060
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-05-14 15:44:07 +00:00
..
analyzer
async Don't allow completing a _Future with itself. 2024-05-14 15:44:07 +00:00
collection [dart2wasm] Fix off-by-one error in List.insert() 2024-02-08 14:05:44 +00:00
convert [dart2wasm] Fix string array copy in UTF8 decoder 2023-10-24 12:02:48 +00:00
developer [ dart:developer ] Remove Metrics related classes 2023-03-10 16:50:10 +00:00
fix_data_tests Remove deprecated APIs from dart:developer 2022-07-19 07:10:03 +00:00
html Reland "Tweak expect.dart library." 2024-04-26 15:28:26 +00:00
isolate Reland "Tweak expect.dart library." 2024-04-26 15:28:26 +00:00
js [dart:js_interop] Fix lowerings of ExternalDartReferences 2024-04-26 19:08:13 +00:00
js_interop_unsafe [dart:js_interop_unsafe] Add has helper 2024-01-03 01:00:19 +00:00
math Spelling tests 2023-01-19 16:24:29 +00:00
mirrors Reland "Tweak expect.dart library." 2024-04-26 15:28:26 +00:00
typed_data [vm] Introduce pragma vm:deeply-immutable 2024-03-07 18:33:58 +00:00
web
lib.status [web] Add static js interop .call() tests 2024-04-02 17:03:12 +00:00
lib_analyzer.status
lib_app_jit.status
lib_dart2js.status [tests] delete html/async_test. 2024-01-22 18:54:04 +00:00
lib_dartdevc.status [ddc] Add configuration to compile with asserts 2024-04-04 14:40:30 +00:00
lib_kernel.status [gardening] Mark all tests as slow in debug-ia32 mode 2022-07-21 10:22:45 +00:00
lib_precompiled.status [testing] Remove --compiler=none from test.py 2022-10-19 08:09:58 +00:00
lib_vm.status [test] Remove ARM64-specific status entries. 2023-10-09 19:30:29 +00:00