Index: content/browser/renderer_host/media/audio_input_sync_writer.cc |
diff --git a/content/browser/renderer_host/media/audio_input_sync_writer.cc b/content/browser/renderer_host/media/audio_input_sync_writer.cc |
index b9c8ee5e3b6d19c3a84acfbd1b695872c2baf4c1..c972bfaf513b74d65a568cce831c50d1f7df0d92 100644 |
--- a/content/browser/renderer_host/media/audio_input_sync_writer.cc |
+++ b/content/browser/renderer_host/media/audio_input_sync_writer.cc |
@@ -50,9 +50,19 @@ uint32 AudioInputSyncWriter::Write(const void* data, |
<< interval.InMilliseconds() << "ms."; |
} |
} |
- if (!oss.str().empty()) |
+ if (!oss.str().empty()) { |
MediaStreamManager::SendMessageToNativeLog(oss.str()); |
Feng Qian
2014/05/19 23:27:01
I felt it is safer to disabling logging instead of
jiayl
2014/05/19 23:30:20
This is only called for the first audio sample dat
Feng Qian
2014/05/20 15:53:12
thanks for explanation, sounds fine to me.
On 201
|
+ // MediaStreamManager::SendMessageToNativeLog posts a task to the UI thread, |
Feng Qian
2014/05/20 15:53:12
Should comments be inside #if defined(OS_ANDROID)?
|
+ // which will attach the audio thread to the Android java VM. Unlike chrome |
+ // created threads, the audio thread is owned by the OS and does not detach |
+ // itself from the VM on exit, causing a crash (crbug/365915). So we detach |
+ // here to make sure the thread exits clean. |
+#if defined(OS_ANDROID) |
+ base::android::DetachFromVM(); |
tommi (sloooow) - chröme
2014/05/20 12:28:29
Just so that I understand - from information in th
Feng Qian
2014/05/20 15:53:12
tommi@, not sure if I understand your question cor
jiayl
2014/05/20 15:56:14
The crash happens when the thread exists, not whil
|
+#endif |
+ } |
+ |
last_write_time_ = base::Time::Now(); |
uint8* ptr = static_cast<uint8*>(shared_memory_->memory()); |