gecko-dev/dom/fetch
Perry Jiang 2c1b60619c Bug 1622451 - minimize stream copying across IPC boundaries r=asuth,baku
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
2020-05-29 09:09:54 +00:00
..
tests Bug 1629390 - Don't crash when throwing exception with invalid UTF-8. r=smaug 2020-04-30 10:25:58 +00:00
BodyExtractor.cpp bug 1610296 - Rename TypedArray_base::ComputeLengthAndData to TypedArray_base::ComputeState; r=bzbarsky 2020-01-23 03:22:06 +00:00
BodyExtractor.h
ChannelInfo.cpp Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky 2019-12-05 04:44:32 +00:00
ChannelInfo.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/fetch. r=smaug 2020-02-20 16:53:06 +00:00
ChannelInfo.ipdlh
EmptyBody.cpp Bug 1557781 - Better life-time management for BodyStream/FetchStream - part 2 - BodyStream, r=smaug 2019-07-01 20:01:17 +00:00
EmptyBody.h Bug 1557781 - Better life-time management for BodyStream/FetchStream - part 2 - BodyStream, r=smaug 2019-07-01 20:01:17 +00:00
Fetch.cpp Bug 1620966 - Move DocShell.watchedByDevtools to BrowsingContext and rename it to watchedByDevTools. r=nika,jdescottes 2020-05-12 09:18:26 +00:00
Fetch.h Bug 1626441 - Remove nsAutoPtr usage from dom/fetch. r=smaug 2020-04-03 21:05:07 +00:00
FetchDriver.cpp Bug 1532287 - P2 Propagate loading document/worker's COEP to nsHttpChannel through nsILoadInfo r=necko-reviewers,valentin,JuniorHsu 2020-05-19 12:50:39 +00:00
FetchDriver.h Bug 1618543 - Let `fetch()` use "fetch" preloads, r=baku 2020-05-18 12:18:14 +00:00
FetchIPCTypes.h
FetchObserver.cpp
FetchObserver.h
FetchStreamReader.cpp Bug 1620594 - Part 7: Remove TabGroup and SystemGroup. r=nika,bas 2020-04-07 15:17:47 +00:00
FetchStreamReader.h Bug 1595786 - FetchStreamReader takes a copy of the received array buffer, r=bzbarsky 2019-12-20 13:49:25 +00:00
FetchTypes.ipdlh Bug 1622451 - minimize stream copying across IPC boundaries r=asuth,baku 2020-05-29 09:09:54 +00:00
FetchUtil.cpp Bug 1627892 - Make InternalRequest derive from SafeRefCounted. r=dom-workers-and-storage-reviewers,perry 2020-05-11 12:10:53 +00:00
FetchUtil.h Bug 1627892 - Make InternalRequest derive from SafeRefCounted. r=dom-workers-and-storage-reviewers,perry 2020-05-11 12:10:53 +00:00
Headers.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/fetch. r=smaug 2020-02-20 16:53:06 +00:00
Headers.h Bug 1614359 - Remove explicit initialization from Headers in Headers constructor. r=Ehsan 2020-02-11 22:25:58 +00:00
InternalHeaders.cpp Bug 1626570 - Improve handling of copying arrays in dom/fetch/. r=smaug 2020-05-05 14:14:10 +00:00
InternalHeaders.h Bug 1626570 - Improve handling of copying arrays in dom/fetch/. r=smaug 2020-05-05 14:14:10 +00:00
InternalRequest.cpp Bug 1622451 - minimize stream copying across IPC boundaries r=asuth,baku 2020-05-29 09:09:54 +00:00
InternalRequest.h Bug 1622451 - minimize stream copying across IPC boundaries r=asuth,baku 2020-05-29 09:09:54 +00:00
InternalResponse.cpp Bug 1622451 - minimize stream copying across IPC boundaries r=asuth,baku 2020-05-29 09:09:54 +00:00
InternalResponse.h Bug 1622451 - minimize stream copying across IPC boundaries r=asuth,baku 2020-05-29 09:09:54 +00:00
Request.cpp Bug 1631405 - Make sure we initialize all fields of WindowGlobalParent in the constructor. r=nika 2020-05-27 00:27:30 +00:00
Request.h Bug 1627892 - Use SafeRefPtr for Request. r=dom-workers-and-storage-reviewers,perry 2020-05-11 12:13:48 +00:00
Response.cpp Bug 1619112 part 5. Stop accepting nsAString in ErrorResult error-throwing. r=smaug 2020-03-06 21:08:02 +00:00
Response.h Bug 1580082. Align Response constructor IDL with spec. r=baku 2019-09-11 11:06:58 +00:00
moz.build