Fix a bug that -[CWVDownloadTask cancel] causes an assertion failure.
The issue was that this condition is true even when the task is cancelled (state kCancelled): https://cs.chromium.org/chromium/src/ios/web_view/internal/cwv_download_task.mm?l=135&rcl=584d37cf04ac09d05ecacdf946edf11bdeeb0198 So it unintentionally tries to call DisownFile(), which fails. Also introduce CWVDownloadErrorFailed and CWVDownloadErrorAborted because clients probably want to distinguish failure and cancel. Change-Id: I1637aabf8843685ccee01cf272a5f5acee85e005 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504486 Auto-Submit: Hiroshi Ichikawa <ichikawa@chromium.org> Reviewed-by:John Wu <jzw@chromium.org> Commit-Queue: Hiroshi Ichikawa <ichikawa@chromium.org> Cr-Commit-Position: refs/heads/master@{#638431}
Showing
Please register or sign in to comment