Index: base/memory/shared_memory_unittest.cc |
diff --git a/base/memory/shared_memory_unittest.cc b/base/memory/shared_memory_unittest.cc |
index 2bae0e9d1a2cf01103889b650d926a59dceb5d38..36296f4de10072aa17daaf795e78bc60e6c9c92a 100644 |
--- a/base/memory/shared_memory_unittest.cc |
+++ b/base/memory/shared_memory_unittest.cc |
@@ -410,8 +410,8 @@ TEST(SharedMemoryTest, ShareToSelf) { |
memcpy(shmem.memory(), contents.data(), contents.size()); |
EXPECT_TRUE(shmem.Unmap()); |
- SharedMemoryHandle shared_handle; |
- ASSERT_TRUE(shmem.ShareToProcess(GetCurrentProcessHandle(), &shared_handle)); |
+ SharedMemoryHandle shared_handle = shmem.handle().Duplicate(); |
+ ASSERT_TRUE(shared_handle.IsValid()); |
#if defined(OS_WIN) |
ASSERT_TRUE(shared_handle.OwnershipPassesToIPC()); |
#endif |
@@ -422,8 +422,8 @@ TEST(SharedMemoryTest, ShareToSelf) { |
contents, |
StringPiece(static_cast<const char*>(shared.memory()), contents.size())); |
- shared_handle = SharedMemoryHandle(); |
- ASSERT_TRUE(shmem.ShareToProcess(GetCurrentProcessHandle(), &shared_handle)); |
+ shared_handle = shmem.handle().Duplicate(); |
+ ASSERT_TRUE(shared_handle.IsValid()); |
#if defined(OS_WIN) |
ASSERT_TRUE(shared_handle.OwnershipPassesToIPC()); |
#endif |