Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2811)

Unified Diff: media/audio/audio_output_device_unittest.cc

Issue 2852803002: Remove base::SharedMemory::ShareToProcess. (Closed)
Patch Set: Compile error. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/audio_input_device_unittest.cc ('k') | media/gpu/video_decode_accelerator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « media/audio/audio_input_device_unittest.cc ('k') | media/gpu/video_decode_accelerator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698