Commit Graph

31 Commits

Author SHA1 Message Date
Andrea Marchesini
2f3e6d3c75 Bug 1534712 - Expose mozIIPCBlobInputStream for WebRequestUpload, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D28984

--HG--
extra : moz-landing-system : lando
2019-04-26 17:53:27 +00:00
Bogdan Tara
240b24fbe1 Backed out 5 changesets (bug 1534712, bug 1545758) for test_ext_webrequest_upload.html failures CLOSED TREE
Backed out changeset 447b0f5a5802 (bug 1545758)
Backed out changeset 0528f8f11814 (bug 1545758)
Backed out changeset d85c68071b54 (bug 1545758)
Backed out changeset 10b380bc5b0c (bug 1545758)
Backed out changeset 57136f4e7b54 (bug 1534712)
2019-04-25 12:36:51 +03:00
Andrea Marchesini
3512672cd3 Bug 1545758 - Move dom/file IPC components into mozilla::dom namespace - IPCBlobInputStream actors, r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D28191

--HG--
extra : moz-landing-system : lando
2019-04-25 07:44:47 +00:00
Ciure Andrei
7344cf1d0e Backed out changeset a7cbe0438433 (bug 1540733) for causing browser_ipcBlob_temporary.js and test_wasm_recompile.js to perma fail CLOSED TREE 2019-04-19 00:58:10 +03:00
Nika Layzell
d4f1348c4b Bug 1540733 - Create a new IPCBlobInputStreamChild actor when migrating, r=baku
Differential Revision: https://phabricator.services.mozilla.com/D27970

--HG--
extra : moz-landing-system : lando
2019-04-18 15:23:54 +00:00
Andrea Marchesini
0499bad916 Bug 1520150 - Single InputStreams can serialize themselves as IPCRemoteStreams (pipe) - part 1 - Passing IPC managers around, r=smaug
Before this set of patches, the decision of exposing the stream as a pipe was
centralized in IPCStreamUtils, based on the total expectation size of the IPC
message. This triggers issues when multiplex inputStreams contain something
that cannot be sent as a pipe (IPCBlobInputStream, for instance), or something
that it's better to do not set as a pipe (nsFileInputStream), together with
memory streams (nsStringInputStream), which could make the IPC message greater
then what accepted (1mb).

These patches move the "pipe vs non-pipe" choice into the single inputStream
implementation.
2019-01-28 10:48:35 +01:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andrea Marchesini
044ba75ddf Bug 1461426 - IPCBlobInputStreamParent should be sent as underlying stream to the content, r=smaug 2018-05-29 20:02:03 +02:00
Andrea Marchesini
c866348d1e Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 2 - IPCBlobInputStream exposes nsIInputStreamLength, r=smaug 2018-05-23 07:12:35 +02:00
Andrea Marchesini
a8e0f09bb6 Bug 1452950 - Make IPCBlobInputStream thread-safe, r=smaug 2018-05-03 18:41:26 +02:00
Andrea Marchesini
7ee8bf1f9e Bug 1453955 - Synchronize access to various stream classes' async wait callback reference - IPCBlobInputStream, r=mayhemer 2018-04-13 16:40:20 +02:00
Andrea Marchesini
98e4210df4 Bug 1451731 - Synchronize access to various stream classes' async wait callback reference - part 6 - IPCBlobInputStream, r=mayhemer 2018-04-10 17:33:09 +02:00
Andrea Marchesini
cccac16f60 Bug 1403771 - SlicedInputStream takes ownership of the underlying stream and it propagates the Close() call, r=smaug 2017-10-05 07:38:48 +02:00
Sebastian Hengst
d4232ad6f1 Backed out changeset c68498143c13 (bug 1403771) for bustage at dom/file/StreamBlobImpl.cpp:108: 'GetInternalStream' was not declared in this scope. r=backout on a CLOSED TREE 2017-10-04 19:11:13 +02:00
Andrea Marchesini
96a79ce7c9 Bug 1403771 - SlicedInputStream takes ownership of the underlying stream and it propagates the Close() call, r=smaug 2017-10-04 18:51:10 +02:00
Andrea Marchesini
ee5e12fec0 Bug 1397645 - Propagation of the IPCBlobInputStream slicing to the parent process, r=asuth 2017-09-11 17:29:44 +02:00
Andrea Marchesini
7779bd9850 Bug 1397645 - Optimize IPCBlobInputStream slicing with the introduction of nsICloneableInputStreamWithRange, r=asuth 2017-09-11 17:29:15 +02:00
Andrea Marchesini
d8c84ef602 Bug 1397627 - nsIAsyncFileMetadata interface, r=asuth 2017-09-08 16:06:26 +02:00
Andrea Marchesini
e93a152664 Bug 1397627 - IPCBlobInputStream should be always async, r=smaug 2017-09-08 16:06:25 +02:00
Andrea Marchesini
ab022130c2 Bug 1397627 - IPCBlobInputStream doesn't need to be seekable, r=smaug 2017-09-08 16:06:25 +02:00
Andrea Marchesini
10c6acd1a4 Bug 1359718 - Get rid of PBlob - part 5 - Fixing #includes, r=smaug 2017-05-23 18:06:52 +02:00
Sebastian Hengst
8164551943 Backed out changeset 2a2c16255a2c (bug 1359718) 2017-05-23 19:12:10 +02:00
Andrea Marchesini
dc11620f89 Bug 1359718 - Get rid of PBlob - part 5 - Fixing #includes, r=smaug 2017-05-23 18:06:52 +02:00
Sebastian Hengst
65a516ae95 Backed out changeset 58cc2991c47a (bug 1359718) 2017-05-23 18:34:24 +02:00
Andrea Marchesini
5662e3fcaf Bug 1359718 - Get rid of PBlob - part 5 - Fixing #includes, r=smaug 2017-05-23 18:06:52 +02:00
Andrea Marchesini
0556e09658 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
170d6e64ad Bug 1360476 - IPCBlobInputStream needs to be seekable on the parent side, r=smaug 2017-04-28 12:16:08 +02:00
Andrea Marchesini
38a7f75f35 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
d6659b61c0 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
db52df9bd7 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
db0019c058 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