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

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

Issue 159561: Add CHECKs to the ResourceHandler derived classes to see which is returning a NULL IOBuffer:data_. (Closed)
Patch Set: Add comments. Add missing .h file. Created 11 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
Index: chrome/browser/renderer_host/download_throttling_resource_handler.cc
diff --git a/chrome/browser/renderer_host/download_throttling_resource_handler.cc b/chrome/browser/renderer_host/download_throttling_resource_handler.cc
index fb56384b8138ae6d7b4199fa4bee5273f083e2a0..f3ad5bbbd5120c674697d128cf93306b26e832eb 100644
--- a/chrome/browser/renderer_host/download_throttling_resource_handler.cc
+++ b/chrome/browser/renderer_host/download_throttling_resource_handler.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/renderer_host/download_throttling_resource_handler.h"
+#include "base/logging.h"
#include "chrome/browser/renderer_host/download_resource_handler.h"
#include "net/base/io_buffer.h"
@@ -71,6 +72,8 @@ bool DownloadThrottlingResourceHandler::OnWillRead(int request_id,
min_size = 1024;
tmp_buffer_ = new net::IOBuffer(min_size);
*buf = tmp_buffer_.get();
+ // TODO(willchan): Remove after debugging bug 16371.
+ CHECK((*buf)->data());
*buf_size = min_size;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698