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

Unified Diff: chrome/browser/renderer_host/download_throttling_resource_handler.cc

Issue 42573: Prevent data read errors from crashing the browser. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/download_throttling_resource_handler.cc
===================================================================
--- chrome/browser/renderer_host/download_throttling_resource_handler.cc (revision 12330)
+++ chrome/browser/renderer_host/download_throttling_resource_handler.cc (working copy)
@@ -104,6 +104,13 @@
if (download_handler_.get())
return download_handler_->OnResponseCompleted(request_id, status,
security_info);
+
+ // For a download, if ResourceDispatcher::Read() fails,
+ // ResourceDispatcher::OnresponseStarted() will call
+ // OnResponseCompleted(), and we will end up here with an error
+ // status.
+ if (!status.is_success())
+ return false;
NOTREACHED();
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698