summaryrefslogtreecommitdiffstats
path: root/content/child
diff options
context:
space:
mode:
authortyoshino@chromium.org <tyoshino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-17 03:22:50 +0000
committertyoshino@chromium.org <tyoshino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-17 03:22:50 +0000
commitc8f9e2447da70344aa2949fd872edbc48af7b1aa (patch)
treeec207ef44361d95827a0874b2fd595ca29215fae /content/child
parente72f72be8ae18315a7a4e843536ca6faf35109ac (diff)
downloadchromium_src-c8f9e2447da70344aa2949fd872edbc48af7b1aa.zip
chromium_src-c8f9e2447da70344aa2949fd872edbc48af7b1aa.tar.gz
chromium_src-c8f9e2447da70344aa2949fd872edbc48af7b1aa.tar.bz2
DCHECK data_length of ResourceMsg_DataReceived
It helps understanding what value is expected to come. BUG=none Review URL: https://codereview.chromium.org/26959009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229028 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/child')
-rw-r--r--content/child/resource_dispatcher.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index 003a360..9065d0f 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -406,6 +406,8 @@ void ResourceDispatcher::OnReceivedData(int request_id,
int data_offset,
int data_length,
int encoded_data_length) {
+ DCHECK_GT(data_length, 0);
+
PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
if (request_info && data_length > 0) {
CHECK(base::SharedMemory::IsHandleValid(request_info->buffer->handle()));