зеркало из 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 |
||
---|---|---|
.. | ||
tests | ||
BodyExtractor.cpp | ||
BodyExtractor.h | ||
ChannelInfo.cpp | ||
ChannelInfo.h | ||
ChannelInfo.ipdlh | ||
EmptyBody.cpp | ||
EmptyBody.h | ||
Fetch.cpp | ||
Fetch.h | ||
FetchDriver.cpp | ||
FetchDriver.h | ||
FetchIPCTypes.h | ||
FetchObserver.cpp | ||
FetchObserver.h | ||
FetchStreamReader.cpp | ||
FetchStreamReader.h | ||
FetchTypes.ipdlh | ||
FetchUtil.cpp | ||
FetchUtil.h | ||
Headers.cpp | ||
Headers.h | ||
InternalHeaders.cpp | ||
InternalHeaders.h | ||
InternalRequest.cpp | ||
InternalRequest.h | ||
InternalResponse.cpp | ||
InternalResponse.h | ||
Request.cpp | ||
Request.h | ||
Response.cpp | ||
Response.h | ||
moz.build |