Skip to content

Commit

Permalink
Destroy existing AudioManager instances before creating new ones.
Browse files Browse the repository at this point in the history
BUG=327013
TEST=no more crashes

Review URL: https://codereview.chromium.org/93793008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239651 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
dalecurtis@chromium.org committed Dec 10, 2013
1 parent bd8cd49 commit f63c2eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions media/audio/audio_manager_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ class AudioManagerTest
#if defined(USE_ALSA) || defined(USE_PULSEAUDIO)
template <class T>
void CreateAudioManagerForTesting() {
// Only one AudioManager may exist at a time, so destroy the one we're
// currently holding before creating a new one.
audio_manager_.reset();
audio_manager_.reset(T::Create(&fake_audio_log_factory_));
}
#endif
Expand Down

0 comments on commit f63c2eb

Please sign in to comment.