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

Unified Diff: base/memory/shared_memory_handle_win.cc

Issue 2875453002: Add a size parameter to SharedMemoryHandle. (Closed)
Patch Set: Remove extraneous period. Created 3 years, 7 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_handle_posix.cc ('k') | base/memory/shared_memory_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_handle_win.cc
diff --git a/base/memory/shared_memory_handle_win.cc b/base/memory/shared_memory_handle_win.cc
index 75930c026e822ec2f7ae8fbd962388f0be60aee2..8b728565a7138af9c121209031193b4064ae7f3e 100644
--- a/base/memory/shared_memory_handle_win.cc
+++ b/base/memory/shared_memory_handle_win.cc
@@ -9,12 +9,12 @@
namespace base {
-SharedMemoryHandle::SharedMemoryHandle()
- : handle_(nullptr), ownership_passes_to_ipc_(false) {}
+SharedMemoryHandle::SharedMemoryHandle() {}
SharedMemoryHandle::SharedMemoryHandle(HANDLE h,
+ size_t size,
const base::UnguessableToken& guid)
- : handle_(h), ownership_passes_to_ipc_(false), guid_(guid) {}
+ : handle_(h), guid_(guid), size_(size) {}
void SharedMemoryHandle::Close() const {
DCHECK(handle_ != nullptr);
@@ -33,7 +33,7 @@ SharedMemoryHandle SharedMemoryHandle::Duplicate() const {
if (!success)
return SharedMemoryHandle();
- base::SharedMemoryHandle handle(duped_handle, GetGUID());
+ base::SharedMemoryHandle handle(duped_handle, GetSize(), GetGUID());
handle.SetOwnershipPassesToIPC(true);
return handle;
}
« no previous file with comments | « base/memory/shared_memory_handle_posix.cc ('k') | base/memory/shared_memory_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698