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

Unified Diff: media/audio/audio_manager_base.cc

Issue 2521583003: Adds speculative CHECKs to diagnose AudioManager crashes. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager_base.cc
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc
index d46fc43f58fc98fbe7e5aab69018a6d7f4705d8c..bcfa6490d48c39e51eeb594dccb3ee68277437a5 100644
--- a/media/audio/audio_manager_base.cc
+++ b/media/audio/audio_manager_base.cc
@@ -106,7 +106,7 @@ AudioOutputStream* AudioManagerBase::MakeAudioOutputStream(
const AudioParameters& params,
const std::string& device_id,
const LogCallback& log_callback) {
- DCHECK(GetTaskRunner()->BelongsToCurrentThread());
+ CHECK(GetTaskRunner()->BelongsToCurrentThread());
if (!params.IsValid()) {
DLOG(ERROR) << "Audio parameters are invalid";
@@ -160,7 +160,7 @@ AudioInputStream* AudioManagerBase::MakeAudioInputStream(
const AudioParameters& params,
const std::string& device_id,
const LogCallback& log_callback) {
- DCHECK(GetTaskRunner()->BelongsToCurrentThread());
+ CHECK(GetTaskRunner()->BelongsToCurrentThread());
if (!params.IsValid() || (params.channels() > kMaxInputChannels) ||
device_id.empty()) {
@@ -204,7 +204,7 @@ AudioInputStream* AudioManagerBase::MakeAudioInputStream(
AudioOutputStream* AudioManagerBase::MakeAudioOutputStreamProxy(
const AudioParameters& params,
const std::string& device_id) {
- DCHECK(GetTaskRunner()->BelongsToCurrentThread());
+ CHECK(GetTaskRunner()->BelongsToCurrentThread());
// If the caller supplied an empty device id to select the default device,
// we fetch the actual device id of the default device so that the lookup
@@ -286,6 +286,7 @@ void AudioManagerBase::GetAudioOutputDeviceNames(
}
void AudioManagerBase::ReleaseOutputStream(AudioOutputStream* stream) {
+ CHECK(GetTaskRunner()->BelongsToCurrentThread());
DCHECK(stream);
CHECK_GT(num_output_streams_, 0);
// TODO(xians) : Have a clearer destruction path for the AudioOutputStream.
@@ -296,6 +297,7 @@ void AudioManagerBase::ReleaseOutputStream(AudioOutputStream* stream) {
}
void AudioManagerBase::ReleaseInputStream(AudioInputStream* stream) {
+ CHECK(GetTaskRunner()->BelongsToCurrentThread());
DCHECK(stream);
// TODO(xians) : Have a clearer destruction path for the AudioInputStream.
CHECK_EQ(1u, input_streams_.erase(stream));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698