зеркало из https://github.com/mozilla/gecko-dev.git
2c1b60619c
Initially, IPCInternal{Request,Response} had contained IPCStreams which would result in unecessary copying when sending the objects over IPC. The patch makes these streams either: 1) ParentToParentStream (just a UUID) 2) ParentToChildStream (a PIPCBlobInputStream actor, acting as a handle) 3) ChildToParentStream (a real IPCStream) These three types are union-ed together by the BodyStreamVariant IPDL structure. This structure replaces the IPCStream members in IPCInternal{Request,Response} so that, depending on the particular IPDL protocol, we can avoid cloning streams and just pass handles/IDs instead. As a side effect, this makes file-backed Response objects cloneable. Initially, these Responses would be backed by an nsFileInputStream, which is not cloneable outside the parent process. They are now backed by IPCBlobInputStreams, which are cloneable. One thing that's not really satisfactory (IMO), is the manual management of IPCBlobInputStreamStorage so that no streams are leaked, e.g. if we store a stream in the IPCBlobInputStreamStorage but fail to send an IPC message and therefore fail to remove the stream from storage on the other side of the IPC boundary (only parent-to-parent in this case). Differential Revision: https://phabricator.services.mozilla.com/D73173 |
||
---|---|---|
.. | ||
ipc | ||
tests | ||
uri | ||
BaseBlobImpl.cpp | ||
BaseBlobImpl.h | ||
Blob.cpp | ||
Blob.h | ||
BlobImpl.cpp | ||
BlobImpl.h | ||
BlobSet.cpp | ||
BlobSet.h | ||
EmptyBlobImpl.cpp | ||
EmptyBlobImpl.h | ||
File.cpp | ||
File.h | ||
FileBlobImpl.cpp | ||
FileBlobImpl.h | ||
FileCreatorHelper.cpp | ||
FileCreatorHelper.h | ||
FileList.cpp | ||
FileList.h | ||
FileReader.cpp | ||
FileReader.h | ||
FileReaderSync.cpp | ||
FileReaderSync.h | ||
MemoryBlobImpl.cpp | ||
MemoryBlobImpl.h | ||
MultipartBlobImpl.cpp | ||
MultipartBlobImpl.h | ||
MutableBlobStorage.cpp | ||
MutableBlobStorage.h | ||
MutableBlobStreamListener.cpp | ||
MutableBlobStreamListener.h | ||
StreamBlobImpl.cpp | ||
StreamBlobImpl.h | ||
StringBlobImpl.cpp | ||
StringBlobImpl.h | ||
TemporaryFileBlobImpl.cpp | ||
TemporaryFileBlobImpl.h | ||
moz.build |