diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-16 23:21:16 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-16 23:21:16 +0000 |
commit | e143e8cee2bdc3e87bd3b95140016489f209d7e6 (patch) | |
tree | 17cb3bf36a3010670b8530bc953fb5eaa3705826 /media/audio/linux | |
parent | ec348507c86c875b051f561bdb5cde1162534d97 (diff) | |
download | chromium_src-e143e8cee2bdc3e87bd3b95140016489f209d7e6.zip chromium_src-e143e8cee2bdc3e87bd3b95140016489f209d7e6.tar.gz chromium_src-e143e8cee2bdc3e87bd3b95140016489f209d7e6.tar.bz2 |
Fixed memory leaks in media_unittests that cause heapcheck errors.
BUG=none
TEST=none
TBR=ajwong@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/linux')
-rw-r--r-- | media/audio/linux/alsa_output_unittest.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/media/audio/linux/alsa_output_unittest.cc b/media/audio/linux/alsa_output_unittest.cc index 1575168..44a395b 100644 --- a/media/audio/linux/alsa_output_unittest.cc +++ b/media/audio/linux/alsa_output_unittest.cc @@ -754,6 +754,15 @@ TEST_F(AlsaPcmOutputStreamTest, ScheduleNextWrite) { .WillOnce(Return(10)); test_stream_->ScheduleNextWrite(false); + // TODO(sergeyu): Figure out how to check that the task has been added to the + // message loop. + + // Cleanup the message queue. Currently ~MessageQueue() doesn't free pending + // tasks unless running on valgrind. The code below is needed to keep + // heapcheck happy. + test_stream_->stop_stream_ = true; + message_loop_.RunAllPending(); + test_stream_->shared_data_.TransitionTo(AlsaPcmOutputStream::kIsClosed); } |