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

Unified Diff: content/renderer/media/webrtc_audio_device_impl.cc

Issue 310463002: Fix the aec dump crash when users disable aec dump without closing the "Save File" overlay. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed the offline comments. Created 6 years, 7 months 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
Index: content/renderer/media/webrtc_audio_device_impl.cc
diff --git a/content/renderer/media/webrtc_audio_device_impl.cc b/content/renderer/media/webrtc_audio_device_impl.cc
index ae37d2074b2f1159605f9cf97197f40f976b5e6b..d5d6142d680bc7fee63941ca1fbba9e7129a9a59 100644
--- a/content/renderer/media/webrtc_audio_device_impl.cc
+++ b/content/renderer/media/webrtc_audio_device_impl.cc
@@ -524,7 +524,11 @@ bool WebRtcAudioDeviceImpl::GetAuthorizedDeviceInfoForAudioRenderer(
void WebRtcAudioDeviceImpl::EnableAecDump(base::File aec_dump_file) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(aec_dump_file.IsValid());
- DCHECK(!aec_dump_file_.IsValid());
+
+ // Close the previous AEC dump file description if it has not been consumed.
Henrik Grunell 2014/05/30 11:24:39 What is the case when this can happen? Add it to t
no longer working on chromium 2014/06/02 08:34:14 Done.
+ if (aec_dump_file_.IsValid())
+ aec_dump_file_.Close();
+
aec_dump_file_ = aec_dump_file.Pass();
MaybeStartAecDump();
}

Powered by Google App Engine
This is Rietveld 408576698