gecko-dev/dom/file
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
..
ipc Bug 1622451 - minimize stream copying across IPC boundaries r=asuth,baku 2020-05-29 09:09:54 +00:00
tests Bug 1614462: Part 2d - Fix tests that don't need to use mozbrowser. r=mccr8 2020-04-20 22:31:29 +00:00
uri Bug 1432949 - Allow system principal initialize a channel for revoked blob URLs r=geckoview-reviewers,snorp,baku,ckerschb 2020-05-20 14:39:28 +00:00
BaseBlobImpl.cpp Bug 1586761 - P4 - Use new methods in dom/file and dom/events; r=baku 2020-03-25 14:14:37 +00:00
BaseBlobImpl.h Bug 1586761 - P4 - Use new methods in dom/file and dom/events; r=baku 2020-03-25 14:14:37 +00:00
Blob.cpp Bug 1586761 - P4 - Use new methods in dom/file and dom/events; r=baku 2020-03-25 14:14:37 +00:00
Blob.h Bug 1030481 - Remove nsIMutable, r=smaug 2020-01-07 15:02:00 +00:00
BlobImpl.cpp Bug 1619518 - part 4 - FileBlobImpl inherits BlobImpl directly, r=ssengupta,smaug 2020-03-05 05:48:58 +00:00
BlobImpl.h Bug 1619518 - part 4 - FileBlobImpl inherits BlobImpl directly, r=ssengupta,smaug 2020-03-05 05:48:58 +00:00
BlobSet.cpp
BlobSet.h
EmptyBlobImpl.cpp Bug 1030481 - Remove nsIMutable, r=smaug 2020-01-07 15:02:00 +00:00
EmptyBlobImpl.h Bug 1620010 - Clean up BlobImplType string propagation, r=ssengupta 2020-03-06 12:08:48 +00:00
File.cpp Bug 1586761 - P4 - Use new methods in dom/file and dom/events; r=baku 2020-03-25 14:14:37 +00:00
File.h Bug 1619518 - part 2 - Better File.lastModified attribute handling, r=ssengupta,ttung,dom-workers-and-storage-reviewers,smaug 2020-03-04 23:10:22 +00:00
FileBlobImpl.cpp Bug 1619518 - part 4 - FileBlobImpl inherits BlobImpl directly, r=ssengupta,smaug 2020-03-05 05:48:58 +00:00
FileBlobImpl.h Bug 1619518 - part 4 - FileBlobImpl inherits BlobImpl directly, r=ssengupta,smaug 2020-03-05 05:48:58 +00:00
FileCreatorHelper.cpp
FileCreatorHelper.h
FileList.cpp
FileList.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/file. r=smaug 2020-02-20 16:11:24 +00:00
FileReader.cpp Bug 1485319 - P1 - Call to nsTSubstring::GetMutableData removed r=baku 2020-03-03 21:02:19 +00:00
FileReader.h
FileReaderSync.cpp Bug 1623083 - No recursion in FileReaderSync::SyncRead, r=sg 2020-03-18 09:46:38 +00:00
FileReaderSync.h Bug 1623083 - No recursion in FileReaderSync::SyncRead, r=sg 2020-03-18 09:46:38 +00:00
MemoryBlobImpl.cpp Bug 1586761 - P4 - Use new methods in dom/file and dom/events; r=baku 2020-03-25 14:14:37 +00:00
MemoryBlobImpl.h Bug 1586761 - P4 - Use new methods in dom/file and dom/events; r=baku 2020-03-25 14:14:37 +00:00
MultipartBlobImpl.cpp Bug 1586761 - P4 - Use new methods in dom/file and dom/events; r=baku 2020-03-25 14:14:37 +00:00
MultipartBlobImpl.h Bug 1586761 - P4 - Use new methods in dom/file and dom/events; r=baku 2020-03-25 14:14:37 +00:00
MutableBlobStorage.cpp
MutableBlobStorage.h
MutableBlobStreamListener.cpp
MutableBlobStreamListener.h
StreamBlobImpl.cpp Bug 1620010 - Clean up BlobImplType string propagation, r=ssengupta 2020-03-06 12:08:48 +00:00
StreamBlobImpl.h Bug 1620010 - Clean up BlobImplType string propagation, r=ssengupta 2020-03-06 12:08:48 +00:00
StringBlobImpl.cpp Bug 1620010 - Clean up BlobImplType string propagation, r=ssengupta 2020-03-06 12:08:48 +00:00
StringBlobImpl.h Bug 1620010 - Clean up BlobImplType string propagation, r=ssengupta 2020-03-06 12:08:48 +00:00
TemporaryFileBlobImpl.cpp Bug 1619518 - part 4 - FileBlobImpl inherits BlobImpl directly, r=ssengupta,smaug 2020-03-05 05:48:58 +00:00
TemporaryFileBlobImpl.h Bug 1620010 - Clean up BlobImplType string propagation, r=ssengupta 2020-03-06 12:08:48 +00:00
moz.build