summaryrefslogtreecommitdiffstats
path: root/base/sync_socket_posix.cc
Commit message (Collapse)AuthorAgeFilesLines
* Revert revert 132842xians@chromium.org2012-04-191-2/+23
| | | | | | | | | | | | | | | | If we are using blocking write, when the renderer stop getting the data without notifying the browser, it will hang the browser. This happens with some plugins which use the sync sockets provided by the Pepper. This patch change CancellableSyncSocket to be non-blocking on sending, so that we don't need to worry the whole browser hangs by one plugin application. Also, we remove the lock in audio_sync_reader.cc since it is not really needed if we don't set the socket_ to NULL when calling Close(). By doing this we allow the user to close the socket while another thread is writing to the socket. BUG=121152 TEST=ipc_tests TBR=tommi@chromium.org Review URL: https://chromiumcodereview.appspot.com/10124004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132975 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 132842 - If we are using blocking write, when the renderer stop ↵thestig@chromium.org2012-04-181-23/+2
| | | | | | | | | | | | | | | | | | | getting the data without notifying the browser, it will hang the browser. This happens with some plugins which use the sync sockets provided by the Pepper. This patch change CancellableSyncSocket to be non-blocking on sending, so that we don't need to worry the whole browser hangs by one plugin application. Also, we remove the lock in audio_sync_reader.cc since it is not really needed if we don't set the socket_ to NULL when calling Close(). By doing this we allow the user to close the socket while another thread is writing to the socket. BUG=121152 TEST=ipc_tests Review URL: http://codereview.chromium.org/10000004 TBR=xians@chromium.org Review URL: https://chromiumcodereview.appspot.com/10083064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132888 0039d316-1c4b-4281-b951-d872f2087c98
* If we are using blocking write, when the renderer stop getting the data ↵xians@chromium.org2012-04-181-2/+23
| | | | | | | | | | | | | | | | without notifying the browser, it will hang the browser. This happens with some plugins which use the sync sockets provided by the Pepper. This patch change CancellableSyncSocket to be non-blocking on sending, so that we don't need to worry the whole browser hangs by one plugin application. Also, we remove the lock in audio_sync_reader.cc since it is not really needed if we don't set the socket_ to NULL when calling Close(). By doing this we allow the user to close the socket while another thread is writing to the socket. BUG=121152 TEST=ipc_tests Review URL: http://codereview.chromium.org/10000004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132842 0039d316-1c4b-4281-b951-d872f2087c98
* Implement support for a cancelable SyncSocket.tommi@chromium.org2012-01-251-25/+38
| | | | | | | | | | | | Currently, blocking SyncSocket operations can not be unblocked from other threads, but this is now supported by using the CancelableSyncSocket class. The implementation on Mac and Linux is very simple and basically consists of adding a call to shutdown(). On Windows however things are a tiny bit more complex since we use named pipes with synchronous IO and canceling synchronous IO is simply not possible on XP and arguably tricky on Vista+. So, what we do instead is to use asynchronous IO in a synchronous fashion to support the SyncSocket semantics and as well as allowing the connection to be correctly shut down from another thread. Review URL: https://chromiumcodereview.appspot.com/8965053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119051 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed CID 102675, uninitialized member varsgroby@chromium.org2011-12-221-2/+2
| | | | | | | | | | CID=102675, 102638 TEST=none Review URL: http://codereview.chromium.org/8965049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115579 0039d316-1c4b-4281-b951-d872f2087c98
* Replace most LOG/CHECK statements with DLOG/DCHECK statements in base.brettw@chromium.org2011-10-261-3/+3
| | | | | | | | | | | [ Reland of 107042 http://codereview.chromium.org/8368009 ] I tried hard not to change CHECKs that had side effects. I kept fatal checks that seemed security or debugging-info (in crash reports) sensitive, and ones that seems particularly well-conceived. Review URL: http://codereview.chromium.org/8341026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107434 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 107042 - Replace most LOG/CHECK statements with DLOG/DCHECK ↵brettw@chromium.org2011-10-251-3/+3
| | | | | | | | | | | | | | statements in base. I tried hard not to change CHECKs that had side effects. I kept fatal checks that seemed security or debugging-info (in crash reports) sensitive, and ones that seems particularly well-conceived. Review URL: http://codereview.chromium.org/8368009 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/8351025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107051 0039d316-1c4b-4281-b951-d872f2087c98
* Replace most LOG/CHECK statements with DLOG/DCHECK statements in base.brettw@chromium.org2011-10-251-3/+3
| | | | | | | | | I tried hard not to change CHECKs that had side effects. I kept fatal checks that seemed security or debugging-info (in crash reports) sensitive, and ones that seems particularly well-conceived. Review URL: http://codereview.chromium.org/8368009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107042 0039d316-1c4b-4281-b951-d872f2087c98
* Patch for Solaris support, mostly ifdefs and header files, plus adds ↵chromium@hybridsource.org2011-06-251-0/+4
| | | | | | | | | | | libevent configuration. BUG=30101 TEST=compiles Review URL: http://codereview.chromium.org/7238021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90494 0039d316-1c4b-4281-b951-d872f2087c98
* Update DCHECK() usage to utilize the more expressive debugging functions.kushi.p@gmail.com2011-04-221-3/+3
| | | | | | | | BUG=58409 Review URL: http://codereview.chromium.org/6891008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82639 0039d316-1c4b-4281-b951-d872f2087c98
* Dup command-buffer SHM handle before auto-closing.piman@google.com2011-02-231-5/+11
| | | | | | | | | | | This also adds error logging to the various places we close file descriptors, to help diagnosing future similar issues. BUG=none TEST=Pepper Flash + youtube in oop with --enable-accelerated-plugins Review URL: http://codereview.chromium.org/6549037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75792 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 2)thestig@chromium.org2010-08-061-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3010052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55191 0039d316-1c4b-4281-b951-d872f2087c98
* Style cleanup in preparation for auto-linting base/.erg@google.com2010-01-261-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/552004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37164 0039d316-1c4b-4281-b951-d872f2087c98
* Add an implementation of base::SyncSocket::Peek for posix platforms. Alsosehr@google.com2009-12-061-3/+7
| | | | | | | | | update the unit test to test the result. TEST=ipc_tests/sync_socket_unittest.cc Review URL: http://codereview.chromium.org/468023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33944 0039d316-1c4b-4281-b951-d872f2087c98
* Add non-blocking peek for the syncsocketcpu@chromium.org2009-12-041-0/+6
| | | | | | | | | | | | - Windows only BUG=none TEST=unit test included Review URL: http://codereview.chromium.org/464020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33876 0039d316-1c4b-4281-b951-d872f2087c98
* Implement SyncSocket class for Posix targets (Linux, Mac), and enable thesehr@google.com2009-11-261-0/+101
corresponding unittest. This feature, as a reminder, allows low-latency (blocking) send/receive between processes, and will be used for real-time thread synchronization for Pepper audio and for direct synchronization for 3D video. Review URL: http://codereview.chromium.org/431043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33161 0039d316-1c4b-4281-b951-d872f2087c98