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

Unified Diff: content/browser/renderer_host/media/audio_sync_reader.h

Issue 10083064: Revert 132842 - If we are using blocking write, when the renderer stop getting the data without not… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « base/sync_socket_win.cc ('k') | content/browser/renderer_host/media/audio_sync_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/audio_sync_reader.h
===================================================================
--- content/browser/renderer_host/media/audio_sync_reader.h (revision 132887)
+++ content/browser/renderer_host/media/audio_sync_reader.h (working copy)
@@ -52,6 +52,12 @@
// PrepareForeignSocketHandle() is called and ran successfully.
scoped_ptr<base::CancelableSyncSocket> foreign_socket_;
+ // Protect socket_ access by lock to prevent race condition when audio
+ // controller thread closes the reader and hardware audio thread is reading
+ // data. This way we know that socket would not be deleted while we are
+ // writing data to it.
+ base::Lock lock_;
+
DISALLOW_COPY_AND_ASSIGN(AudioSyncReader);
};
« no previous file with comments | « base/sync_socket_win.cc ('k') | content/browser/renderer_host/media/audio_sync_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698