Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wasm] Fix handling of streaming cancellation
When the stream gets cancelled, we receive a `BytesConsumer::Result::kError` value in `OnStateChange`. In this case, there is no network error though, so `consume_->GetError()` will return an empty string or run into a DCHECK in debug builds. This CL handles this better by checking the state of the consumer before calling `GetError()`, and producing two different error messages depending on whether the consumer is closed or errored (which are the two defined final states). R=ahaas@chromium.org Bug: chromium:1448858, chromium:1449546 Change-Id: I2efae5454944c94dd4baa109a55b132b974295c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4608425 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#1157080}
- Loading branch information