summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_posix.cc
Commit message (Collapse)AuthorAgeFilesLines
* Up the warnings in ipc (take 2)thomasvl@google.com2010-07-231-3/+3
| | | | | | | | | | | | | | | - add chromium_code:1 to the GYP file - Fix some unittest compares of literal 0 to apis that return size_t - initializer order match declared order - type_id is a uint32, so fix up comparison warnings by using the right type in the test code. - duplicate a type cast used in the ipc headers into the ipc impl to make windows happy. - msvc warns about getenv, avoid it. BUG=none TEST=everything still builds/works Review URL: http://codereview.chromium.org/2821028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53468 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 51520 - Up the warnings in ipcthomasvl@chromium.org2010-07-021-3/+3
| | | | | | | | | | | | | | | | add chromium_code:1 to the GYP file Fix some unittest compares of literal 0 to apis that return size_t initializer order match declared order type_id is a uint32, so fix up comparison warnings by using the right type in the test code. BUG=none TEST=everything still builds/works Review URL: http://codereview.chromium.org/2863034 TBR=thomasvl@google.com Review URL: http://codereview.chromium.org/2852042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51523 0039d316-1c4b-4281-b951-d872f2087c98
* Up the warnings in ipcthomasvl@google.com2010-07-021-3/+3
| | | | | | | | | | | | | - add chromium_code:1 to the GYP file - Fix some unittest compares of literal 0 to apis that return size_t - initializer order match declared order - type_id is a uint32, so fix up comparison warnings by using the right type in the test code. BUG=none TEST=everything still builds/works Review URL: http://codereview.chromium.org/2863034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51520 0039d316-1c4b-4281-b951-d872f2087c98
* Clang: Do not ignore result of HANDLE_EINTR.thakis@chromium.org2010-06-231-17/+34
| | | | | | Review URL: http://codereview.chromium.org/2805026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50556 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 49988 - ipcthakis@chromium.org2010-06-161-32/+16
| | | | | | | TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/2855004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49996 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 49989 - xthakis@chromium.org2010-06-161-2/+1
| | | | | | | TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/2822013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49995 0039d316-1c4b-4281-b951-d872f2087c98
* xthakis@chromium.org2010-06-161-1/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49989 0039d316-1c4b-4281-b951-d872f2087c98
* ipcthakis@chromium.org2010-06-161-16/+32
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49988 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: make sure that we never pass directory descriptors into the sandbox.agl@chromium.org2010-06-101-0/+9
| | | | | | | | BUG=43304 http://codereview.chromium.org/2733011/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49446 0039d316-1c4b-4281-b951-d872f2087c98
* chunk of straightforward ifdef/include changes for BSD portpvalchev@google.com2010-05-191-10/+10
| | | | | | | based on sprewell's patch Review URL: http://codereview.chromium.org/2069009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47687 0039d316-1c4b-4281-b951-d872f2087c98
* SELinux: add basic policy.agl@chromium.org2010-04-191-0/+5
| | | | | | | | | | | | | | | | This patch removes the chromium_zygote_t type and adds a chromium_renderer_t type. Also, a basic policy for chromium_renderer_t is included. I decided not to try to have a different policy for the zygote since it just makes things more complex for little reason. BUG=none TEST=none http://codereview.chromium.org/1104002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44908 0039d316-1c4b-4281-b951-d872f2087c98
* The plugin channel host in the renderer process should not initialize IPCmark@chromium.org2010-03-161-1/+7
| | | | | | | | | | | | | | | | | | | | | using a known-closed channel name. Instead, when the channel name is known to be closed, initialization should fail. On POSIX systems, the channel is created by the plugin channel in the plugin process and shared with the renderer process over IPC. If the channel closes, the renderer process must not attempt to reestablish it; the plugin process must do that. This serves as early detection for and an escape from the assertion that causes renderers to die and be replaced by a sad tab when attempting to open multiple pages with plugins simultaneously. This resolves the Mac renderer top crash. BUG=26754 TEST=Test case from bug 26754 comment 9 (affected Macs only): a. Have lots of bookmarks (import Safari defaults) b. Right-click on bookmark bar, and choose "Open All Bookmarks" Expect: no crash, no sad tabs. This test should be repeated many times. Review URL: http://codereview.chromium.org/984004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41755 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Better handle oversized IPC messages" r37102jeremy@chromium.org2010-01-261-13/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37104 0039d316-1c4b-4281-b951-d872f2087c98
* Better handle oversized IPC messagesjeremy@chromium.org2010-01-261-0/+13
| | | | | | | | | | | | | | * Shoot down oversized messages on the sending side so we fail faster. * Add DCHECKs to identify oversized messages early. The real fix for the underlying bug is not to send oversized messages in the first place, but the current state of things is that it takes a long while for the renderer to crash. This change should speed the failure up a bit. BUG=26822 TEST=Chrome should continue to load web pages. Review URL: http://codereview.chromium.org/546047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37102 0039d316-1c4b-4281-b951-d872f2087c98
* Recognize EMSGSIZE as non-fatal on OS X.jeremy@chromium.org2009-12-081-8/+21
| | | | | | | | | BUG=29225 TEST=PageCyclerTest.Intl2File test should succeed. Review URL: http://codereview.chromium.org/460102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34056 0039d316-1c4b-4281-b951-d872f2087c98
* Added new IPC message class for CommandBuffer.apatrick@google.com2009-12-041-1/+3
| | | | | | | | | | Increased IPC message header type from 16 bits to 32 bits so it can accomodate more message classes. TEST=none BUG=none Review URL: http://codereview.chromium.org/399013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33832 0039d316-1c4b-4281-b951-d872f2087c98
* Add paranoid logging to ChannelImpl::ProcessOutgoingMessages() to help track ↵jeremy@chromium.org2009-12-031-1/+10
| | | | | | | | | | | down bug. BUG=29225 TEST=none Review URL: http://codereview.chromium.org/462021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33677 0039d316-1c4b-4281-b951-d872f2087c98
* Don't reuse the initial IPC channel.mark@chromium.org2009-11-301-0/+10
| | | | | | | | | | | | | | | | | | | | I was seeing a non-initial IPC channel getting closed in a renderer, and then when someone tried to reuse that channel by name, IPC::Channel::ChannelImpl::CreatePipe would assign the initial pipe. The initial pipe was already in use, and things would fall apart pretty rapidly. I'm making this FATAL because the renderer's probably going to be unusable if it gets into this state anyway, and a sad tab is probably more useful than a tab that appears to be loading indefinitely. BUG=26754 TEST=Test case from bug 26754 comment 9 (affected machines only): a. Have lots of bookmarks (import Safari defaults) b. Rightclick on bookmark bar, and choose "Open All Bookmarks" Expect: no crash. Review URL: http://codereview.chromium.org/452021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33351 0039d316-1c4b-4281-b951-d872f2087c98
* Use AutoReset (formerly ScopedBool) where possible.pkasting@chromium.org2009-11-201-1/+0
| | | | | | | | | | This frequently saves a tiny bit of code, but even when it doesn't I think it's more future-proof (less error-prone). BUG=none TEST=none Review URL: http://codereview.chromium.org/399096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32708 0039d316-1c4b-4281-b951-d872f2087c98
* linux: cut down on EPIPE error spewevan@chromium.org2009-10-231-1/+5
| | | | | | Review URL: http://codereview.chromium.org/315019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29859 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: remove the pipe errors that we spew all the time.agl@chromium.org2009-10-161-1/+2
| | | | | | Review URL: http://codereview.chromium.org/288007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29313 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate all uses of strerror() in code that uses src/base. strerror() is ↵tschmelcher@chromium.org2009-10-131-8/+8
| | | | | | | | | | | inherently unsafe in multi-threaded apps because it stores the string in a global buffer. It should never be used. If you want to log an error, use PLOG and friends, or if that's too high-level then use safe_strerror(). TEST=built on Linux in 32-bit and 64-bit mode; ran base_unittests in each case; ran Chromium itself in each case; try servers BUG=none Review URL: http://codereview.chromium.org/261055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28850 0039d316-1c4b-4281-b951-d872f2087c98
* Fix reads and writes to freed memory in ↵hawk@chromium.org2009-09-251-0/+2
| | | | | | | | | | Channel::ChannelImpl::OnFileCanReadWithoutBlocking() BUG=22451 TEST=valgrind should no longer report the freed write error in the UtilityProcessHostTest.ExtensionUnpacker test Review URL: http://codereview.chromium.org/207050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27289 0039d316-1c4b-4281-b951-d872f2087c98
* IPC & LibEvent fixjeremy@chromium.org2009-09-231-2/+0
| | | | | | | | | | | * Allow IPC::Listeners to send a message on OnChannelConnected. * Fix a bug in MessagePumpLibevent::WatchFileDescriptor causing a read-after-free. BUG=22451 Review URL: http://codereview.chromium.org/209061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26946 0039d316-1c4b-4281-b951-d872f2087c98
* On Linux, move the passing of filedescriptors to a dedicated socketpair().agl@chromium.org2009-09-041-38/+215
| | | | | | | | | | | | | | | | | (Patch by Markus) This allows the fast path to use read()/write() instead of recvmsg()/sendmsg() which is much cheaper for the Seccomp sandbox. Also, fixed minor seccomp sandbox issues discovered by this change. BUG=19120 ISSUE=164373 http://codereview.chromium.org/177049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25518 0039d316-1c4b-4281-b951-d872f2087c98
* Split the IPC code into ipc/agl@chromium.org2009-07-221-0/+837
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This splits the ipc code from the common project. The 'common' project pulls in all of webkit, the v8 bindings, skia, googleurl, and a number of other projects which makes it very difficult to deal with especially for external projects wanting just to use some of Chromium's infrastructure. This puts the ipc code into its top-level ipc/ directory with a dependency only on base. The common project depends on the new ipc/ipc.gyp:ipc target so that all projects currently pulling common in to get the IPC code still have it available. This mostly follows agl's pre-gyp attempt to do this which was r13062. Known issues: - Currently a number of projects depend on chrome/chrome.gyp:common in order to use the IPC infrastructure. Rather than fixing all of these dependencies I have made common depend on ipc/ipc.gyp:ipc and added "ipc" to the include_rules section of DEPS so that checkdeps.py doesn't complain. Over time projects that need IPC should depend on the IPC project themselves and dependencies on common removed, although I don't think many projects that need IPC will be able to get away without common currently. - ipc/ipc_message_macros.h still has #include "chrome/common/..." inside of a ipc/ should not refer to files in chrome/... now. I'm not sure how to resolve this since it's really an IDE bug - the named pipe name (windows+linux) and the logging event name (all) + env variable (posix) refer explicitly to 'Chrome' which somewhat hurts the illusion of ipc/ being an independent library. I think this should be examined in a subsequent, much smaller patch. - I've eliminated the IPC.SendMsgCount counter since it was implemented in a way to create a dependency from ipc/ to chrome/common/chrome_counters. This is the same approach that r13062 took. http://codereview.chromium.org/155905 (Patch from James Robinson) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21342 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Move IPC code to ipc/"agl@chromium.org2009-04-031-803/+0
| | | | | | | This reverts commit r13062 which, unsurprisingly, broke the build. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13063 0039d316-1c4b-4281-b951-d872f2087c98
* Move IPC code to ipc/agl@chromium.org2009-04-031-0/+803
(No review URL: Rietvelt couldn't cope) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13062 0039d316-1c4b-4281-b951-d872f2087c98