diff options
author | enal@chromium.org <enal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-05 02:25:02 +0000 |
---|---|---|
committer | enal@chromium.org <enal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-05 02:25:02 +0000 |
commit | 9faa065eed72e1a816c94b0764135ee0a1bcfb7a (patch) | |
tree | 91b63267ac56a599ae861839be6bd623a65abbbf /media/audio/audio_output_controller.h | |
parent | c104a8966ef3e260f84f85840fa1c69501224cac (diff) | |
download | chromium_src-9faa065eed72e1a816c94b0764135ee0a1bcfb7a.zip chromium_src-9faa065eed72e1a816c94b0764135ee0a1bcfb7a.tar.gz chromium_src-9faa065eed72e1a816c94b0764135ee0a1bcfb7a.tar.bz2 |
Fix race condition (bug 108685).
In the ~AudioOutputController() we were calling method supposed to be run
on the audio manager message loop only.
BUG=108685
TEST=Should not be noticeable, crash should go away.
Review URL: http://codereview.chromium.org/9085030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/audio_output_controller.h')
-rw-r--r-- | media/audio/audio_output_controller.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/media/audio/audio_output_controller.h b/media/audio/audio_output_controller.h index 5234f58..274b5d3 100644 --- a/media/audio/audio_output_controller.h +++ b/media/audio/audio_output_controller.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,6 +16,10 @@ #include "media/audio/audio_manager.h" #include "media/audio/simple_sources.h" +namespace base { +class WaitableEvent; +} // namespace base + class MessageLoop; // An AudioOutputController controls an AudioOutputStream and provides data @@ -220,7 +224,8 @@ class MEDIA_EXPORT AudioOutputController void StartStream(); // Helper method that stops, closes, and NULLs |*stream_|. - void StopCloseAndClearStream(); + // Signals event when done if it is not NULL. + void DoStopCloseAndClearStream(base::WaitableEvent *done); scoped_refptr<AudioManager> audio_manager_; // |handler_| may be called only if |state_| is not kClosed. |