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

Unified Diff: chrome/common/resource_dispatcher.cc

Issue 21208: POSIX: Transfer network data using shared memory (Closed)
Patch Set: ... Created 11 years, 10 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 | « chrome/common/ipc_tests.cc ('k') | chrome/renderer/render_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/resource_dispatcher.cc
diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc
index 7f64d32af4d0263c0eb5d84e572f45c2fa328bf2..e9db613f4a323677d8887f0d690985c6900736b5 100644
--- a/chrome/common/resource_dispatcher.cc
+++ b/chrome/common/resource_dispatcher.cc
@@ -342,7 +342,8 @@ void ResourceDispatcher::OnReceivedData(int request_id,
sender->Send(
new ViewHostMsg_DataReceived_ACK(MSG_ROUTING_NONE, request_id));
- DCHECK((shm_handle && data_len > 0) || (!shm_handle && !data_len));
+ const bool shm_valid = base::SharedMemory::IsHandleValid(shm_handle);
+ DCHECK((shm_valid && data_len > 0) || (!shm_valid && !data_len));
base::SharedMemory shared_mem(shm_handle, true); // read only
PendingRequestList::iterator it = pending_requests_.find(request_id);
« no previous file with comments | « chrome/common/ipc_tests.cc ('k') | chrome/renderer/render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698