| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This is just following up on a code review promise.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9676 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In general, the IPC Message objects are const and the iterator state is a void*
kept by the code which is doing the deserialisation.
However, now that we have an array of file descriptors, the index of the next
file descriptor is part of the iteration state and is kept /inside/ the Message
(in the DescriptorSet). This means that it's a mutable member, which is never
too nice and also, since the logging functions want to parse a message multiple
times, we've had to turn off returning an error when one runs off the end of
the array.
Also, the Message copy constructor and assignment function alters the /source/
Message, by stealing all of its descriptors
This patch encodes the index of each file descriptor on the wire. So the state
is moved from inside the DescriptorSet into the serialised data.
Additionally, the DescriptorSet is made into a lazyily created scoped_refptr,
solving the problems with copying messages.
Review URL: http://codereview.chromium.org/20275
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9644 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
For the moment, we enable IPC logging with an environment variable
(CHROME_IPC_LOGGING) and log everything to stderr.
Review URL: http://codereview.chromium.org/20156
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9643 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds the long planned support for sharing memory on POSIX
by transporting file descriptors. It largely builds on the shared
memory cleanup work by jrg.
We move FileDescriptor out of chrome/common/file_descriptor_posix.h
and into base/file_descriptor_posix.h. Since all that's left in the
chrome/common verion is the DescriptorSet, those files are renamed to
descriptor_set.[h|cc].
The SharedMemoryHandle on POSIX then becomes a typedef to a
FileDescriptor and thus can be serialised over IPC.
After that, it's mostly a case of cleaning up those snippets of code
which considered SharedMemoryHandles to be scaler values.
Review URL: http://codereview.chromium.org/21208
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9580 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
This patch introduces a FileDescriptor object which can be included in IPC messages and will perform the magic needed to pass file descriptors over IPC. After some consideration, Windows will continue to do the current DuplicateHandle tricks.
Review URL: http://codereview.chromium.org/20027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9369 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a HANDLE from CreateEvent was used for signaling, both within a process and across processes.
WaitableEvent is the cross platform replacement for this. To convert:
* HANDLE -> base::WaitableEvent*
* ScopedHandle -> scoped_ptr<base::WaitableEvent>
* CreateEvent -> new base::WaitableEvent
* SetEvent -> base::WaitableEvent::Signal
* ResetEvent -> base::WaitableEvent::Reset
* ObjectWatcher -> base::WaitableEventWatcher
* WaitForMultipleObjects -> static base::WaitableEvent::WaitMany
ObjectWatcher remains for Windows specific code. WaitableEventWatcher has an identical interface save,
* It uses WaitableEvents, not HANDLEs
* It returns void from StartWatching and StopWatcher, rather than errors. System internal errors are fatal to the address space
IMPORTANT: There are semantic differences between the different platforms. WaitableEvents on Windows are implemented on top of events. Windows events work across process and this is used mostly for modal dialog support. Windows events can be duplicated with DuplicateHandle.
On other platforms, WaitableEvent works only within a single process. In the future we shall have to replace the current uses of cross-process events with IPCs.
BEWARE: HANDLE, on Windows, is a void *. Since any pointer type coerces to void *, you can pass a WaitableEvent * where a HANDLE is expected without any build-time errors.
Review URL: http://codereview.chromium.org/16554
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8126 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
Patch contributed by knorton@google.com
See http://codereview.chromium.org/270
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1822 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
|
|
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15 0039d316-1c4b-4281-b951-d872f2087c98
|