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

Unified Diff: components/discardable_memory/service/discardable_shared_memory_manager.cc

Issue 2849633002: Get rid of base::SharedMemory::NULLHandle(); (Closed)
Patch Set: Rebase. Created 3 years, 8 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 | « base/memory/shared_memory_win.cc ('k') | components/nacl/common/nacl_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/discardable_memory/service/discardable_shared_memory_manager.cc
diff --git a/components/discardable_memory/service/discardable_shared_memory_manager.cc b/components/discardable_memory/service/discardable_shared_memory_manager.cc
index e2966c798c78bfafbc28f69e0d85095aa9f89582..650fc0134af4554f94d4540fb145bd0d40c74e71 100644
--- a/components/discardable_memory/service/discardable_shared_memory_manager.cc
+++ b/components/discardable_memory/service/discardable_shared_memory_manager.cc
@@ -440,7 +440,7 @@ void DiscardableSharedMemoryManager::AllocateLockedDiscardableSharedMemory(
MemorySegmentMap& client_segments = clients_[client_id];
if (client_segments.find(id) != client_segments.end()) {
LOG(ERROR) << "Invalid discardable shared memory ID";
- *shared_memory_handle = base::SharedMemory::NULLHandle();
+ *shared_memory_handle = base::SharedMemoryHandle();
return;
}
@@ -461,14 +461,14 @@ void DiscardableSharedMemoryManager::AllocateLockedDiscardableSharedMemory(
std::unique_ptr<base::DiscardableSharedMemory> memory(
new base::DiscardableSharedMemory);
if (!memory->CreateAndMap(size)) {
- *shared_memory_handle = base::SharedMemory::NULLHandle();
+ *shared_memory_handle = base::SharedMemoryHandle();
return;
}
base::CheckedNumeric<size_t> checked_bytes_allocated = bytes_allocated_;
checked_bytes_allocated += memory->mapped_size();
if (!checked_bytes_allocated.IsValid()) {
- *shared_memory_handle = base::SharedMemory::NULLHandle();
+ *shared_memory_handle = base::SharedMemoryHandle();
return;
}
« no previous file with comments | « base/memory/shared_memory_win.cc ('k') | components/nacl/common/nacl_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698