Index: content/browser/loader/async_resource_handler.cc |
diff --git a/content/browser/loader/async_resource_handler.cc b/content/browser/loader/async_resource_handler.cc |
index 2eace36852ea9a048c8a6dd6f77135619b42752a..96cb4f401ff18b0eb6ae5e2169e049cba342f5b6 100644 |
--- a/content/browser/loader/async_resource_handler.cc |
+++ b/content/browser/loader/async_resource_handler.cc |
@@ -329,6 +329,11 @@ bool AsyncResourceHandler::OnReadCompleted(int bytes_read, bool* defer) { |
int encoded_data_length = current_transfer_size - reported_transfer_size_; |
reported_transfer_size_ = current_transfer_size; |
+ // TODO(erikchen): Remove me after finished debugging for |
+ // http://crbug.com/527588. |
+ // The data offset can't exceed the size of the buffer. |
+ CHECK_LE(data_offset, kBufferSize); |
+ |
filter->Send(new ResourceMsg_DataReceived( |
GetRequestID(), data_offset, bytes_read, encoded_data_length)); |
++pending_data_count_; |