Commit Graph

11 Commits

Author SHA1 Message Date
Andrea Marchesini
32c69c4c9b Bug 1359718 - Get rid of PBlob - part 5 - Fixing #includes, r=smaug 2017-05-23 18:06:52 +02:00
Sebastian Hengst
b348ad0e24 Backed out changeset 2a2c16255a2c (bug 1359718) 2017-05-23 19:12:10 +02:00
Andrea Marchesini
98ba00163a Bug 1359718 - Get rid of PBlob - part 5 - Fixing #includes, r=smaug 2017-05-23 18:06:52 +02:00
Sebastian Hengst
a0c0861aff Backed out changeset 58cc2991c47a (bug 1359718) 2017-05-23 18:34:24 +02:00
Andrea Marchesini
a05c2875f2 Bug 1359718 - Get rid of PBlob - part 5 - Fixing #includes, r=smaug 2017-05-23 18:06:52 +02:00
Andrea Marchesini
54a48ae735 Bug 1360185 - Use of IPCBlob in IndexedDB - part 5 - IPCBlobInputStream must implement nsIFileMetadata, r=janv
This patch uses also AsyncWait() to store Wasm modules into indexedDB
2017-05-23 07:52:47 +02:00
Andrea Marchesini
ffc8382e16 Bug 1360476 - IPCBlobInputStream needs to be seekable on the parent side, r=smaug 2017-04-28 12:16:08 +02:00
Andrea Marchesini
c350ba13b2 Bug 1353629 - PBlob refactoring - part 13 - IPCBlobInputStream should support remote nsIAsyncInputStream, r=smaug
If a child-to-parent IPCBlob is more than 1mb, we end up using a pipe stream.
If that ipcBlob is sent to a different process, we need to implement asyncWait
correctly: we need to call the remoteStream->AsyncWait().
2017-04-24 12:09:41 +02:00
Andrea Marchesini
3d35b17f21 Bug 1353629 - PBlob refactoring - part 7 - IPCBlobInputStream must implement nsIAsyncInputStream, r=smaug
In order to retrieve data from an IPCBlobInputStream, it must be used as
nsIAsyncInputStream.
2017-04-24 12:09:40 +02:00
Andrea Marchesini
34568e6fa9 Bug 1353629 - PBlob refactoring - part 6 - IPCBlobInputStream serialization, r=smaug
IPCBlobInputStream must implement nsIIPCSerializableInputStream interface.
When this is done, the child sends the internal ID of the IPCBlobInputStream to
the parent.
2017-04-24 12:09:40 +02:00
Andrea Marchesini
b87a2a73d2 Bug 1353629 - PBlob refactoring - part 4 - IPCBlobInputStream, r=smaug
IPCBlobInputStream is a new type of nsIInputStream that is used only in content
process when a Blob is sent from parent to child. This inputStream is for now,
just cloneable.

When the parent process sends a Blob to a content process, it has the Blob and
its inputStream. With its inputStream it creates a IPCBlobInputStreamParent
actor. This actor keeps the inputStream alive for following uses (not part of
this patch).

On the child side we will have, of course, a IPCBlobInputStreamChild actor.
This actor is able to create a IPCBlobInputStream when CreateStream() is
called.  This means that 1 IPCBlobInputStreamChild can manage multiple
IPCBlobInputStreams each time one of them is cloned. When the last one of this
stream is released, the child actor sends a __delete__ request to the parent
side; the parent will be deleted, and the original inputStream, on the parent
side, will be released as well.

IPCBlobInputStream is a special inputStream because each method, except for
Available() fails. Basically, this inputStream cannot be used on the content
process for nothing else than knowing the size of the original stream.

In the following patches, I'll introduce an async way to use it.
2017-04-24 12:09:40 +02:00