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

Unified Diff: content/renderer/media/audio_input_device.h

Issue 8659040: There is a racing between SyncSocket::Receive in audio_thread_ and SyncSocket::Close in renderer ... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: new proposal from timmi Created 9 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
Index: content/renderer/media/audio_input_device.h
===================================================================
--- content/renderer/media/audio_input_device.h (revision 111890)
+++ content/renderer/media/audio_input_device.h (working copy)
@@ -170,7 +170,7 @@
// Method called on the audio thread ----------------------------------------
// Calls the client's callback for capturing audio.
- void FireCaptureCallback();
+ void FireCaptureCallback(int16* input_audio);
// DelegateSimpleThread::Delegate implementation.
virtual void Run() OVERRIDE;
@@ -195,11 +195,6 @@
// Callbacks for capturing audio occur on this thread.
scoped_ptr<base::DelegateSimpleThread> audio_thread_;
- // IPC message stuff.
- base::SharedMemory* shared_memory() { return shared_memory_.get(); }
- base::SyncSocket* socket() { return socket_.get(); }
- void* shared_memory_data() { return shared_memory()->memory(); }
-
// Cached audio input message filter (lives on the main render thread).
scoped_refptr<AudioInputMessageFilter> filter_;
@@ -214,8 +209,9 @@
// callback. Only modified on the IO thread.
bool pending_device_ready_;
- scoped_ptr<base::SharedMemory> shared_memory_;
- scoped_ptr<base::SyncSocket> socket_;
+ base::SharedMemoryHandle shared_memory_handle_;
+ base::SyncSocket::Handle socket_handle_;
+ int memory_length_;
DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice);
};

Powered by Google App Engine
This is Rietveld 408576698