Index: base/memory/shared_memory_handle_mac.cc |
diff --git a/base/memory/shared_memory_handle_mac.cc b/base/memory/shared_memory_handle_mac.cc |
index d5c5fbad415d05363678e65f6da76a7197624a2c..3f1d4d83748657a72366535c55aea37d077c3832 100644 |
--- a/base/memory/shared_memory_handle_mac.cc |
+++ b/base/memory/shared_memory_handle_mac.cc |
@@ -39,17 +39,14 @@ SharedMemoryHandle::SharedMemoryHandle(mach_vm_size_t size) { |
memory_object_ = named_right; |
size_ = size; |
- pid_ = GetCurrentProcId(); |
ownership_passes_to_ipc_ = false; |
} |
SharedMemoryHandle::SharedMemoryHandle(mach_port_t memory_object, |
- mach_vm_size_t size, |
- base::ProcessId pid) |
+ mach_vm_size_t size) |
: type_(MACH), |
memory_object_(memory_object), |
size_(size), |
- pid_(pid), |
ownership_passes_to_ipc_(false) {} |
SharedMemoryHandle::SharedMemoryHandle(const SharedMemoryHandle& handle) { |
@@ -78,7 +75,7 @@ SharedMemoryHandle SharedMemoryHandle::Duplicate() const { |
} |
case MACH: { |
if (!IsValid()) |
- return SharedMemoryHandle(MACH_PORT_NULL, 0, 0); |
+ return SharedMemoryHandle(); |
// Increment the ref count. |
kern_return_t kr = mach_port_mod_refs(mach_task_self(), memory_object_, |
@@ -137,7 +134,6 @@ bool SharedMemoryHandle::MapAt(off_t offset, |
MAP_SHARED, file_descriptor_.fd, offset); |
return *memory != MAP_FAILED; |
case SharedMemoryHandle::MACH: |
- DCHECK_EQ(pid_, GetCurrentProcId()); |
kern_return_t kr = mach_vm_map( |
mach_task_self(), |
reinterpret_cast<mach_vm_address_t*>(memory), // Output parameter |
@@ -190,7 +186,6 @@ void SharedMemoryHandle::CopyRelevantData(const SharedMemoryHandle& handle) { |
case MACH: |
memory_object_ = handle.memory_object_; |
size_ = handle.size_; |
- pid_ = handle.pid_; |
ownership_passes_to_ipc_ = handle.ownership_passes_to_ipc_; |
break; |
} |