Index: media/audio/audio_output_device_unittest.cc |
diff --git a/media/audio/audio_output_device_unittest.cc b/media/audio/audio_output_device_unittest.cc |
index e6ede19a2858597b055ed08bad64238931b68e67..bad1f8c72ae0a0eed036adeedd88699c3995d6de 100644 |
--- a/media/audio/audio_output_device_unittest.cc |
+++ b/media/audio/audio_output_device_unittest.cc |
@@ -227,10 +227,12 @@ void AudioOutputDeviceTest::CreateStream() { |
SyncSocket::TransitDescriptor audio_device_socket_descriptor; |
ASSERT_TRUE(renderer_socket_.PrepareTransitDescriptor( |
base::GetCurrentProcessHandle(), &audio_device_socket_descriptor)); |
- base::SharedMemoryHandle duplicated_memory_handle; |
- ASSERT_TRUE(shared_memory_.ShareToProcess(base::GetCurrentProcessHandle(), |
- &duplicated_memory_handle)); |
+ base::SharedMemoryHandle duplicated_memory_handle = |
+ shared_memory_.handle().Duplicate(); |
+ ASSERT_TRUE(duplicated_memory_handle.IsValid()); |
+ // TODO(erikchen): This appears to leak the SharedMemoryHandle. |
+ // https://crbug.com/640840. |
audio_device_->OnStreamCreated( |
duplicated_memory_handle, |
SyncSocket::UnwrapHandle(audio_device_socket_descriptor), kMemorySize); |