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

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

Issue 125024: Handle file descriptor exhaustions a little more gracefully. This prevents th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 | « base/shared_memory_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/buffered_resource_handler.cc
===================================================================
--- chrome/browser/renderer_host/buffered_resource_handler.cc (revision 18168)
+++ chrome/browser/renderer_host/buffered_resource_handler.cc (working copy)
@@ -94,12 +94,14 @@
if (finished_)
return false;
- bool ret = real_handler_->OnWillRead(request_id, buf, buf_size, min_size);
+ if (!real_handler_->OnWillRead(request_id, buf, buf_size, min_size)) {
+ return false;
+ }
read_buffer_ = *buf;
read_buffer_size_ = *buf_size;
DCHECK(read_buffer_size_ >= kMaxBytesToSniff * 2);
bytes_read_ = 0;
- return ret;
+ return true;
}
bool BufferedResourceHandler::OnReadCompleted(int request_id, int* bytes_read) {
« no previous file with comments | « base/shared_memory_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698