Chromium Code Reviews| Index: net/base/sdch_dictionary_fetcher.cc |
| diff --git a/net/base/sdch_dictionary_fetcher.cc b/net/base/sdch_dictionary_fetcher.cc |
| index 3e6f590852c3ec84ec343f516ceb6c6e481133f9..4a45f107e3e8b48270ddac282525b7141ae3a819 100644 |
| --- a/net/base/sdch_dictionary_fetcher.cc |
| +++ b/net/base/sdch_dictionary_fetcher.cc |
| @@ -204,6 +204,14 @@ int SdchDictionaryFetcher::DoRead(int rv) { |
| return ERR_IO_PENDING; |
| DCHECK_NE(current_request_->status().error(), OK); |
|
Ryan Hamilton
2014/09/23 21:38:38
Technically, the style guide prohibits "handling"
|
| + if (current_request_->status().error() == OK) { |
| + // This "should never happen", but if it does the result will be |
| + // an infinite loop. It's not clear how to handle a read failure |
| + // without a promise to invoke the callback at some point in the future, |
| + // so the request is failed. |
| + SdchManager::SdchErrorRecovery(SdchManager::DICTIONARY_FETCH_READ_FAILED); |
| + return ERR_FAILED; |
| + } |
| return current_request_->status().error(); |
| } |