0450462503
Ensure errors are only sent when there is an appropriate time to flush them (plus ensure if of those places flushes them). Fixes https://github.com/dart-lang/sdk/issues/33778. Change-Id: Ieb4a2631c24649ba013eda93808b003b0e2ddb95 Bug: https://github.com/dart-lang/sdk/issues/33778 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101822 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>