f31923beee
Set up a cancellation Completer that we forward errors to if the stream has been cancelled. Also add `isDone` which will avoid forwarding registering the cancellation logic if the stream has already finished. Fixes test co19/Language/Expressions/Function_Invocation/async_generator_invokation_t10.dart on wasm targets. This test already passes for all other backends. Fixes: https://github.com/dart-lang/sdk/issues/63123 Change-Id: I8a3d87c3ea7b4ebb3a7b82ab064fb57034aa6f4a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/495200 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com>