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

Unified Diff: content/child/child_discardable_shared_memory_manager.cc

Issue 939343003: content: Add valid handle check to ChildDiscardableSharedMemoryManager::AllocateLockedDiscardableSh… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_discardable_shared_memory_manager.cc
diff --git a/content/child/child_discardable_shared_memory_manager.cc b/content/child/child_discardable_shared_memory_manager.cc
index 140e9495d58f7a7665b7b686c2c65db02c0bcc95..b1a6b8098267b189dd218c6e196a80fea27c810b 100644
--- a/content/child/child_discardable_shared_memory_manager.cc
+++ b/content/child/child_discardable_shared_memory_manager.cc
@@ -187,6 +187,7 @@ ChildDiscardableSharedMemoryManager::AllocateLockedDiscardableSharedMemory(
sender_->Send(
new ChildProcessHostMsg_SyncAllocateLockedDiscardableSharedMemory(
size, &handle));
+ CHECK(base::SharedMemory::IsHandleValid(handle));
scoped_ptr<base::DiscardableSharedMemory> memory(
new base::DiscardableSharedMemory(handle));
CHECK(memory->Map(size));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698