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 12f2f6893e016e9513e61a72596cd5e9f5a31630..13af82dbd952263bc36d023a736eea808717a654 100644 |
--- a/base/memory/shared_memory_handle_mac.cc |
+++ b/base/memory/shared_memory_handle_mac.cc |
@@ -8,7 +8,6 @@ |
#include <sys/mman.h> |
#include <unistd.h> |
-#include "base/mac/mac_util.h" |
#include "base/posix/eintr_wrapper.h" |
namespace base { |
@@ -45,17 +44,12 @@ |
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) |
- : type_(MACH), |
- memory_object_(memory_object), |
- size_(size), |
- pid_(pid), |
- ownership_passes_to_ipc_(false) {} |
+ : type_(MACH), memory_object_(memory_object), size_(size), pid_(pid) {} |
SharedMemoryHandle::SharedMemoryHandle(const SharedMemoryHandle& handle) |
: type_(handle.type_) { |
@@ -177,9 +171,6 @@ |
return *memory && *memory != reinterpret_cast<void*>(-1); |
case SharedMemoryHandle::MACH: |
- // The flag VM_PROT_IS_MASK is only supported on OSX 10.7+. |
- DCHECK(mac::IsOSLionOrLater()); |
- |
DCHECK_EQ(pid_, GetCurrentProcId()); |
kern_return_t kr = mach_vm_map( |
mach_task_self(), |
@@ -191,7 +182,7 @@ |
offset, |
FALSE, // Copy |
VM_PROT_READ | (read_only ? 0 : VM_PROT_WRITE), // Current protection |
- VM_PROT_WRITE | VM_PROT_READ | VM_PROT_IS_MASK, // Maximum protection |
+ VM_PROT_READ | VM_PROT_WRITE, // Maximum protection |
VM_INHERIT_NONE); |
return kr == KERN_SUCCESS; |
} |
@@ -214,16 +205,6 @@ |
} |
} |
-void SharedMemoryHandle::SetOwnershipPassesToIPC(bool ownership_passes) { |
- DCHECK_EQ(type_, MACH); |
- ownership_passes_to_ipc_ = ownership_passes; |
-} |
- |
-bool SharedMemoryHandle::OwnershipPassesToIPC() const { |
- DCHECK_EQ(type_, MACH); |
- return ownership_passes_to_ipc_; |
-} |
- |
void SharedMemoryHandle::CopyRelevantData(const SharedMemoryHandle& handle) { |
switch (type_) { |
case POSIX: |
@@ -233,7 +214,6 @@ |
memory_object_ = handle.memory_object_; |
size_ = handle.size_; |
pid_ = handle.pid_; |
- ownership_passes_to_ipc_ = handle.ownership_passes_to_ipc_; |
break; |
} |
} |