Index: base/metrics/persistent_memory_allocator_unittest.cc |
diff --git a/base/metrics/persistent_memory_allocator_unittest.cc b/base/metrics/persistent_memory_allocator_unittest.cc |
index f67da0c7abfe6f9f46e2673205ac62693cdaca64..b3b4d9b9afc17479f27c3fda76f37a038e5ae7d5 100644 |
--- a/base/metrics/persistent_memory_allocator_unittest.cc |
+++ b/base/metrics/persistent_memory_allocator_unittest.cc |
@@ -620,10 +620,10 @@ TEST(SharedPersistentMemoryAllocatorTest, CreationTest) { |
EXPECT_FALSE(local.IsFull()); |
EXPECT_FALSE(local.IsCorrupt()); |
- ASSERT_TRUE(local.shared_memory()->ShareToProcess(GetCurrentProcessHandle(), |
- &shared_handle_1)); |
- ASSERT_TRUE(local.shared_memory()->ShareToProcess(GetCurrentProcessHandle(), |
- &shared_handle_2)); |
+ shared_handle_1 = local.shared_memory()->handle().Duplicate(); |
+ ASSERT_TRUE(shared_handle_1.IsValid()); |
+ shared_handle_2 = local.shared_memory()->handle().Duplicate(); |
+ ASSERT_TRUE(shared_handle_2.IsValid()); |
} |
// Read-only test. |