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

Unified Diff: content/child/resource_dispatcher.cc

Issue 1334593002: Reland #2 "ipc: Add a new field num_brokered_attachments to the message header." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and type error. Created 5 years, 3 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 | « content/child/child_thread_impl.cc ('k') | content/child/resource_scheduling_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/resource_dispatcher.cc
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index aeb1cbebc66081a825d767c136866c04d3bbe4fd..c9858a970434c76b9f1625336f2c194e4cc6a42f 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -80,6 +80,9 @@ ResourceDispatcher::~ResourceDispatcher() {
}
bool ResourceDispatcher::OnMessageReceived(const IPC::Message& message) {
+ // TODO(erikchen): Temporary code to help track http://crbug.com/527588.
+ content::CheckContentsOfDataReceivedMessage(&message);
+
if (!IsResourceDispatcherMessage(message)) {
return false;
}
@@ -219,9 +222,16 @@ void ResourceDispatcher::OnReceivedData(int request_id,
PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
bool send_ack = true;
if (request_info && data_length > 0) {
+ // TODO(erikchen): Temporary code to help track http://crbug.com/527588.
+ int buffer_size = request_info->buffer_size;
+
CHECK(base::SharedMemory::IsHandleValid(request_info->buffer->handle()));
CHECK_GE(request_info->buffer_size, data_offset + data_length);
+ // TODO(erikchen): Temporary code to help track http://crbug.com/527588.
+ base::debug::Alias(request_info);
+ base::debug::Alias(&buffer_size);
+
// Ensure that the SHM buffer remains valid for the duration of this scope.
// It is possible for Cancel() to be called before we exit this scope.
// SharedMemoryReceivedDataFactory stores the SHM buffer inside it.
« no previous file with comments | « content/child/child_thread_impl.cc ('k') | content/child/resource_scheduling_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698