Files
sdk/runtime
Alexander Markov 9a8b63d6fa [vm/tests] Fix reachability of Finalizer in vm/dart/finalizer/finalizer_zone_run_gc_test
Finalizer is not guaranteed to run if it becomes unreachable.
The test vm/dart/finalizer/finalizer_zone_run_gc_test incorrectly
assumed that Finalizer stored in a local variable is still reachable
after the last use of variable, but that is not guaranteed.

(Previously, async functions captured local variables into the
context and objects stored in local variables in async functions were
reachable even after variables become unused.
With the new async/await implementation, local variables in async
functions are handled in the same way as in ordinary functions and
not stored into the context, so this test started failing as
Finalizer was garbage collected and not executed.)

TEST=vm/dart/finalizer/finalizer_zone_run_gc_test

Change-Id: Id025556c68c5fc1cf08b06d44cb9d5bbd21dd916
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239860
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-04-11 18:01:22 +00:00
..
2022-03-26 09:41:21 +00:00
2022-02-14 14:06:34 +00:00