c2f014064e
Following the revert #98360, make sure the finalizing happens only in debugger. Create the test cases to demonstrate the behavior. Bug: https://github.com/dart-lang/sdk/issues/35859 Change-Id: Ib27fef18a7c0696ec6dc6d045fa06f60677333c8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98422 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Zichang Guo <zichangguo@google.com>