Index: base/memory/shared_memory_unittest.cc |
diff --git a/base/memory/shared_memory_unittest.cc b/base/memory/shared_memory_unittest.cc |
index c129e18d4c3049961ee1462cb93870c2485e594e..7ed8955525ec972392536e3369b0d0657632194b 100644 |
--- a/base/memory/shared_memory_unittest.cc |
+++ b/base/memory/shared_memory_unittest.cc |
@@ -360,13 +360,12 @@ |
// http://crbug.com/320865 |
(void)handle; |
#elif defined(OS_POSIX) |
- int handle_fd = SharedMemory::GetFdFromSharedMemoryHandle(handle); |
- EXPECT_EQ(O_RDONLY, fcntl(handle_fd, F_GETFL) & O_ACCMODE) |
+ EXPECT_EQ(O_RDONLY, fcntl(handle.fd, F_GETFL) & O_ACCMODE) |
<< "The descriptor itself should be read-only."; |
errno = 0; |
- void* writable = mmap(NULL, contents.size(), PROT_READ | PROT_WRITE, |
- MAP_SHARED, handle_fd, 0); |
+ void* writable = mmap( |
+ NULL, contents.size(), PROT_READ | PROT_WRITE, MAP_SHARED, handle.fd, 0); |
int mmap_errno = errno; |
EXPECT_EQ(MAP_FAILED, writable) |
<< "It shouldn't be possible to re-mmap the descriptor writable."; |
@@ -520,8 +519,7 @@ |
EXPECT_TRUE(shared_memory.Create(options)); |
- int shm_fd = |
- SharedMemory::GetFdFromSharedMemoryHandle(shared_memory.handle()); |
+ int shm_fd = shared_memory.handle().fd; |
struct stat shm_stat; |
EXPECT_EQ(0, fstat(shm_fd, &shm_stat)); |
// Neither the group, nor others should be able to read the shared memory |
@@ -547,8 +545,7 @@ |
// Clean-up the backing file name immediately, we don't need it. |
EXPECT_TRUE(shared_memory.Delete(shared_mem_name)); |
- int shm_fd = |
- SharedMemory::GetFdFromSharedMemoryHandle(shared_memory.handle()); |
+ int shm_fd = shared_memory.handle().fd; |
struct stat shm_stat; |
EXPECT_EQ(0, fstat(shm_fd, &shm_stat)); |
// Neither the group, nor others should have been able to open the shared |