Index: content/renderer/media/audio_message_filter_unittest.cc |
diff --git a/content/renderer/media/audio_message_filter_unittest.cc b/content/renderer/media/audio_message_filter_unittest.cc |
index 6bd6a81721b8de29075d9e1923b26d85a9d03360..161970624b467abfdecd9aabcfbb680569025803 100644 |
--- a/content/renderer/media/audio_message_filter_unittest.cc |
+++ b/content/renderer/media/audio_message_filter_unittest.cc |
@@ -24,6 +24,10 @@ class MockAudioDelegate : public media::AudioOutputIPCDelegate { |
MockAudioDelegate() { |
Reset(); |
} |
+ ~MockAudioDelegate() override { |
+ if (handle_.IsValid()) |
+ handle_.Close(); |
+ } |
void OnError() override { error_received_ = true; } |
@@ -54,6 +58,8 @@ class MockAudioDelegate : public media::AudioOutputIPCDelegate { |
device_status_ = media::OUTPUT_DEVICE_STATUS_ERROR_INTERNAL; |
created_received_ = false; |
+ if (handle_.IsValid()) |
+ handle_.Close(); |
handle_ = base::SharedMemoryHandle(); |
length_ = 0; |