Index: content/browser/download/download_item_impl.cc |
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc |
index 753656fee29249a461a1830456242bbddf1e0d26..38f9e1ab89d98111eddd549e6c39cb9194a46b93 100644 |
--- a/content/browser/download/download_item_impl.cc |
+++ b/content/browser/download/download_item_impl.cc |
@@ -414,7 +414,8 @@ void DownloadItemImpl::Cancel(bool user_cancel) { |
if (!is_save_package_download_ && download_file_) |
ReleaseDownloadFile(true); |
- if (state_ == IN_PROGRESS_INTERNAL) { |
+ // |request_handle_| may be NULL during tests. |
+ if (state_ == IN_PROGRESS_INTERNAL && request_handle_) { |
benjhayden
2014/12/11 23:36:24
Should this be checked everywhere that request_han
Dan Beam
2014/12/12 00:07:02
we talked about this on chat -- adding a way to mo
|
// Cancel the originating URL request unless it's already been cancelled |
// by interrupt. |
request_handle_->CancelRequest(); |