Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Unified Diff: content/browser/appcache/appcache_url_loader_job.cc

Issue 2991443002: The Appcache subresource URL factory needs to inform the URLLoaderClient if there is a failure. (Closed)
Patch Set: Disable the test for Android Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/appcache/appcache_subresource_url_factory.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/appcache/appcache_url_loader_job.cc
diff --git a/content/browser/appcache/appcache_url_loader_job.cc b/content/browser/appcache/appcache_url_loader_job.cc
index 8ddd92a49dededf1527e9d065f0f3d539f28e15f..d85ff896bf8f655ab7d3a33ec518ed6a0cae0cee 100644
--- a/content/browser/appcache/appcache_url_loader_job.cc
+++ b/content/browser/appcache/appcache_url_loader_job.cc
@@ -429,9 +429,9 @@ void AppCacheURLLoaderJob::NotifyCompleted(int error_code) {
if (storage_.get())
storage_->CancelDelegateCallbacks(this);
- const net::HttpResponseInfo* http_info = is_range_request()
- ? range_response_info_.get()
- : info_->http_response_info();
+ const net::HttpResponseInfo* http_info =
+ is_range_request() ? range_response_info_.get()
+ : (info_ ? info_->http_response_info() : nullptr);
ResourceRequestCompletionStatus request_complete_data;
request_complete_data.error_code = error_code;
@@ -444,7 +444,7 @@ void AppCacheURLLoaderJob::NotifyCompleted(int error_code) {
request_complete_data.completion_time = base::TimeTicks::Now();
request_complete_data.encoded_body_length =
is_range_request() ? range_response_info_->headers->GetContentLength()
- : info_->response_data_size();
+ : (info_ ? info_->response_data_size() : 0);
request_complete_data.decoded_body_length =
request_complete_data.encoded_body_length;
}
« no previous file with comments | « content/browser/appcache/appcache_subresource_url_factory.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698