Граф коммитов

1099 Коммитов

Автор SHA1 Сообщение Дата
Christian Holler 146a80ecff Bug 1783844 - Remove IPC::Principal type remains from codebase. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D154091
2022-08-10 13:39:11 +00:00
Fabrice Desré c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Andreea Pavel 3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Mark Banner 7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Andrew Sutherland 51a0dc12c2 Bug 1770630 - Worker stream readers should contribute to busy count. r=dom-worker-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D149185
2022-08-03 00:36:01 +00:00
criss fe207fe58a Backed out changeset cc893e08aa2f (bug 1770630) for causing wpt failures on FileReader-multiple-reads.any.worker.html. CLOSED TREE 2022-08-03 01:56:06 +03:00
Andrew Sutherland 4c1582ac65 Bug 1770630 - Worker stream readers should contribute to busy count. r=dom-worker-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D149185
2022-08-02 20:56:53 +00:00
Andreea Pavel 89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré 0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
Tooru Fujisawa a032f53a63 Bug 1780543 - Part 5: Add mozilla/chrome-script environment. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152430
2022-07-26 02:46:30 +00:00
Emilio Cobos Álvarez 42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.

Non-virtual actors can still use `nsString` if they need to on the
receiving end.

Differential Revision: https://phabricator.services.mozilla.com/D152519
2022-07-25 20:19:48 +00:00
Tooru Fujisawa 47c8f80432 Bug 1667455 - Part 6: Stop importing Services.jsm from chrome-priv JS code, non-top-level or multi-line cases. r=kmag,perftest-reviewers,AlexandruIonescu,sparky
Differential Revision: https://phabricator.services.mozilla.com/D150895
2022-07-11 12:41:51 +00:00
Tooru Fujisawa bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Olli Pettay 2a78f9ffc0 Bug 1775501 - multipart boundary should be handled as mixed case, r=kershaw
Since https://github.com/w3c/FileAPI/issues/43 is still open, it is unclear how body.type should work.
The current wpts expect some behavior which isn't in the specifications.
So, since the situation is very messy in the specifications, the patch is doing a
spot fix for boundary handling. It is ugly, but shouldn't change other behavior.

Differential Revision: https://phabricator.services.mozilla.com/D150018
2022-07-11 09:18:32 +00:00
Nika Layzell ffd5c3388d Bug 1773088 - Part 1: Stop requiring an actor to serialize blobs over IPC, r=asuth
This does a somewhat-shallow removal of the argument from the implementation
and all call-sites. Removing it from StructuredCloneData's serialization is
handled in the next part, as it is more widely used and complex.

Differential Revision: https://phabricator.services.mozilla.com/D148531
2022-06-08 15:24:27 +00:00
Nika Layzell d76981c60a Bug 1770279 - Don't invoke null callbacks in RemoteLazyInputStream, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D147198
2022-05-24 15:56:38 +00:00
Nika Layzell 1aa11ffed6 Bug 1754004 - Part 11: Simplify the IPCStream serialization API, r=asuth,necko-reviewers,kershaw
As serializing IPCStream no longer requires a manager or FileDescriptor array,
the arguments are no longer necessary, and can be removed. The AutoIPCStream
helper can also be removed, as managed actors are no longer used for
serialization, so a delayed start callback is not necessary.

The delayed start parameter is also removed from nsIIPCSerializableInputStream
instances, but is still present as `aAllowLazy` on the toplevel serialization
methods.

Differential Revision: https://phabricator.services.mozilla.com/D141048
2022-05-13 14:16:13 +00:00
Nika Layzell 95a883d65d Bug 1754004 - Part 3: Move RemoteLazyInputStream to its own toplevel protocol, r=asuth,necko-reviewers,dragana
This is a complete rewrite of RemoteLazyInputStream to run off of its own
toplevel protocol, rather than being managed by other protocols like
PBackground or PContent. This should improve performance thanks to no longer
needing to operate on a main or worker thread, and due to no longer needing the
migration step for the stream actor.

This also acts as a step towards no longer requiring a manager actor to
serialize input streams, as the type is now actor-agnostic, and should support
being sent over IPC between any pair of processes.

Differential Revision: https://phabricator.services.mozilla.com/D141040
2022-05-13 14:16:10 +00:00
Nika Layzell 2b307c5cea Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-13 14:16:09 +00:00
Nika Layzell ef3794b3c5 Bug 1754004 - Part 1: Switch IPCStream to use DataPipe instead of P{ChildToParent,ParentToChild}Stream, r=asuth,necko-reviewers,kershaw
This gives us various positive benefits, such as using a shared memory ring
buffer for faster communication, not having data streaming being bound to the
thread which transferred the nsIInputStream (which is often the main thread),
and the ability for some backpressure to be applied to data streaming.

After this change, the "delayed start" parameter for IPCStream serialization is
less relevant, as backpressure will serve a similar purpose. It will still be
used to determine whether or not to use RemoteLazyInputStream when serializing
from the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D141038
2022-05-13 14:16:09 +00:00
Nika Layzell 7fb91b57a3 Bug 1759563 - Add SerializedComplexity to limit the complexity of serialized IPCStream instances, r=asuth,necko-reviewers,dragana
This will improve the efficiency of serializing large data pipes, which in bad
cases can end up serializing very small amounts of data in individual pipes
over IPC, and acts as a compliment to the existing logic for limiting
serialized message sizes. It is also necessary for the changes in bug 1754004,
which require the ability to include FileDescriptor inline in the message,
which could blow out our FileDescriptor count limits if pipe creation was
unlimited.

In some tests, this change reduces the number of pipes required to serialize a
nsIInputStream from over 5000 to 1.

Differential Revision: https://phabricator.services.mozilla.com/D141036
2022-05-13 14:16:08 +00:00
Nika Layzell a906eaf6b2 Bug 1754031 - AsyncWait implementations should support updating flags on an existing listener, r=asuth,necko-reviewers,dragana
This operation is often performed by nsAStreamCopier when switching
between the source and sink streams, in order to enable or disable the
WAIT_CLOSURE_ONLY flag. Failing to reset the wait flags can lead to a
NS_AsyncCopy hanging until the source or sink are closed when is
alternating between waiting on input and output streams. This patch
relaxes the incorrect checks on various input streams.

Differential Revision: https://phabricator.services.mozilla.com/D141034
2022-05-13 14:16:07 +00:00
Noemi Erli 45276205df Backed out 22 changesets (bug 1696894, bug 1759569, bug 1754031, bug 1759563, bug 1759572, bug 1754004) for causing leack failures CLOSED TREE
Backed out changeset 673ecd5337e1 (bug 1754004)
Backed out changeset ecbf5f3c51de (bug 1754004)
Backed out changeset fc6c39f56d21 (bug 1754004)
Backed out changeset 5b3d58fbaf9d (bug 1696894)
Backed out changeset 2e56c89cf55d (bug 1754004)
Backed out changeset b7723490f025 (bug 1754004)
Backed out changeset 1dfbf61ff5dd (bug 1754004)
Backed out changeset e73abb071bb3 (bug 1754004)
Backed out changeset f9abe4fbf501 (bug 1754004)
Backed out changeset ee7aeb631cd9 (bug 1754004)
Backed out changeset d66aacfcf983 (bug 1754004)
Backed out changeset 5c2872ad6912 (bug 1754004)
Backed out changeset e1ae48f30d2c (bug 1754004)
Backed out changeset 849b63707d7f (bug 1754004)
Backed out changeset 36563e3b1e04 (bug 1754004)
Backed out changeset ccb4be659107 (bug 1754004)
Backed out changeset 659581d4159b (bug 1754004)
Backed out changeset 611ea76d7a9c (bug 1754004)
Backed out changeset 9b24b561698c (bug 1759572)
Backed out changeset f820e0f209ff (bug 1759563)
Backed out changeset 8d82066fa181 (bug 1759569)
Backed out changeset a2835afab1ad (bug 1754031)
2022-05-11 06:16:25 +03:00
Nika Layzell 024c6e0c0a Bug 1754004 - Part 11: Simplify the IPCStream serialization API, r=asuth,necko-reviewers,kershaw
As serializing IPCStream no longer requires a manager or FileDescriptor array,
the arguments are no longer necessary, and can be removed. The AutoIPCStream
helper can also be removed, as managed actors are no longer used for
serialization, so a delayed start callback is not necessary.

The delayed start parameter is also removed from nsIIPCSerializableInputStream
instances, but is still present as `aAllowLazy` on the toplevel serialization
methods.

Differential Revision: https://phabricator.services.mozilla.com/D141048
2022-05-10 22:27:46 +00:00
Nika Layzell 76cdaba44a Bug 1754004 - Part 3: Move RemoteLazyInputStream to its own toplevel protocol, r=asuth,necko-reviewers,dragana
This is a complete rewrite of RemoteLazyInputStream to run off of its own
toplevel protocol, rather than being managed by other protocols like
PBackground or PContent. This should improve performance thanks to no longer
needing to operate on a main or worker thread, and due to no longer needing the
migration step for the stream actor.

This also acts as a step towards no longer requiring a manager actor to
serialize input streams, as the type is now actor-agnostic, and should support
being sent over IPC between any pair of processes.

Differential Revision: https://phabricator.services.mozilla.com/D141040
2022-05-10 22:27:42 +00:00
Nika Layzell 728ba534f6 Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-10 22:27:42 +00:00
Nika Layzell f9f3cc6138 Bug 1754004 - Part 1: Switch IPCStream to use DataPipe instead of P{ChildToParent,ParentToChild}Stream, r=asuth,necko-reviewers,kershaw
This gives us various positive benefits, such as using a shared memory ring
buffer for faster communication, not having data streaming being bound to the
thread which transferred the nsIInputStream (which is often the main thread),
and the ability for some backpressure to be applied to data streaming.

After this change, the "delayed start" parameter for IPCStream serialization is
less relevant, as backpressure will serve a similar purpose. It will still be
used to determine whether or not to use RemoteLazyInputStream when serializing
from the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D141038
2022-05-10 22:27:41 +00:00
Nika Layzell 7aead901b8 Bug 1759563 - Add SerializedComplexity to limit the complexity of serialized IPCStream instances, r=asuth,necko-reviewers,dragana
This will improve the efficiency of serializing large data pipes, which in bad
cases can end up serializing very small amounts of data in individual pipes
over IPC, and acts as a compliment to the existing logic for limiting
serialized message sizes. It is also necessary for the changes in bug 1754004,
which require the ability to include FileDescriptor inline in the message,
which could blow out our FileDescriptor count limits if pipe creation was
unlimited.

In some tests, this change reduces the number of pipes required to serialize a
nsIInputStream from over 5000 to 1.

Differential Revision: https://phabricator.services.mozilla.com/D141036
2022-05-10 22:27:41 +00:00
Nika Layzell 52ee800295 Bug 1754031 - AsyncWait implementations should support updating flags on an existing listener, r=asuth,necko-reviewers,dragana
This operation is often performed by nsAStreamCopier when switching
between the source and sink streams, in order to enable or disable the
WAIT_CLOSURE_ONLY flag. Failing to reset the wait flags can lead to a
NS_AsyncCopy hanging until the source or sink are closed when is
alternating between waiting on input and output streams. This patch
relaxes the incorrect checks on various input streams.

Differential Revision: https://phabricator.services.mozilla.com/D141034
2022-05-10 22:27:40 +00:00
Kagami Sascha Rosylight b5451a2b91 Bug 1620560 - Part 5: Mark BlobImpl::CreateSlice as const r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D145671
2022-05-06 09:00:29 +00:00
Kagami Sascha Rosylight e9861ec03f Bug 1620560 - Part 4: Mark BlobImpl::GetFileId as const r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D145669
2022-05-06 09:00:29 +00:00
Kagami Sascha Rosylight c1b379141c Bug 1620560 - Part 3: Mark BlobImpl::CreateInputStream as const r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D145668
2022-05-06 09:00:28 +00:00
Kagami Sascha Rosylight 71359f69c7 Bug 1620560 - Part 2: readability-inconsistent-declaration-parameter-name to dom/file r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D145666
2022-05-06 09:00:28 +00:00
Kagami Sascha Rosylight 7d3887bb0b Bug 1620560 - Part 1: Apply modernize-concat-nested-namespaces to dom/file r=smaug
D95456 didn't properly include headers (`--header-filter=dom`).

Differential Revision: https://phabricator.services.mozilla.com/D145665
2022-05-06 09:00:27 +00:00
Kagami Sascha Rosylight d21908d6a0 Bug 1756070 - Part 2: Apply modernize-use-override to dom/file r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D145662
2022-05-06 09:00:27 +00:00
Noemi Erli 39469989c9 Backed out 22 changesets (bug 1759572, bug 1759563, bug 1754004, bug 1754031, bug 1759569, bug 1696894) for causing multiple failures CLOSED TREE
Backed out changeset d69647a725a1 (bug 1754004)
Backed out changeset 09fc506865d7 (bug 1754004)
Backed out changeset 648e3dd4b62f (bug 1754004)
Backed out changeset 3465158ee230 (bug 1696894)
Backed out changeset b08475bbfbd9 (bug 1754004)
Backed out changeset dfabce587a56 (bug 1754004)
Backed out changeset cebe8d5dda34 (bug 1754004)
Backed out changeset 55b4b0c9a504 (bug 1754004)
Backed out changeset e8649de9dd22 (bug 1754004)
Backed out changeset 0f480fc861c0 (bug 1754004)
Backed out changeset e515b7edd1c8 (bug 1754004)
Backed out changeset fe90db9158ac (bug 1754004)
Backed out changeset c6388d682d48 (bug 1754004)
Backed out changeset 2374420d9fed (bug 1754004)
Backed out changeset 44dfd76472aa (bug 1754004)
Backed out changeset 000fb99de0cf (bug 1754004)
Backed out changeset 0ca1856b5fc9 (bug 1754004)
Backed out changeset 10c3683b998b (bug 1754004)
Backed out changeset 4abc98ed6b99 (bug 1759572)
Backed out changeset cdd271a5af42 (bug 1759563)
Backed out changeset fadb6cc0d81c (bug 1759569)
Backed out changeset 44be9709a93e (bug 1754031)
2022-05-06 04:28:47 +03:00
Nika Layzell 445ea16482 Bug 1754004 - Part 11: Simplify the IPCStream serialization API, r=asuth,necko-reviewers,kershaw
As serializing IPCStream no longer requires a manager or FileDescriptor array,
the arguments are no longer necessary, and can be removed. The AutoIPCStream
helper can also be removed, as managed actors are no longer used for
serialization, so a delayed start callback is not necessary.

The delayed start parameter is also removed from nsIIPCSerializableInputStream
instances, but is still present as `aAllowLazy` on the toplevel serialization
methods.

Differential Revision: https://phabricator.services.mozilla.com/D141048
2022-05-05 23:34:24 +00:00
Nika Layzell 2f296a7b38 Bug 1754004 - Part 3: Move RemoteLazyInputStream to its own toplevel protocol, r=asuth,necko-reviewers,dragana
This is a complete rewrite of RemoteLazyInputStream to run off of its own
toplevel protocol, rather than being managed by other protocols like
PBackground or PContent. This should improve performance thanks to no longer
needing to operate on a main or worker thread, and due to no longer needing the
migration step for the stream actor.

This also acts as a step towards no longer requiring a manager actor to
serialize input streams, as the type is now actor-agnostic, and should support
being sent over IPC between any pair of processes.

Differential Revision: https://phabricator.services.mozilla.com/D141040
2022-05-05 23:34:21 +00:00
Nika Layzell 0308ac11a4 Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-05 23:34:21 +00:00
Nika Layzell 3ef777a45c Bug 1754004 - Part 1: Switch IPCStream to use DataPipe instead of P{ChildToParent,ParentToChild}Stream, r=asuth,necko-reviewers,kershaw
This gives us various positive benefits, such as using a shared memory ring
buffer for faster communication, not having data streaming being bound to the
thread which transferred the nsIInputStream (which is often the main thread),
and the ability for some backpressure to be applied to data streaming.

After this change, the "delayed start" parameter for IPCStream serialization is
less relevant, as backpressure will serve a similar purpose. It will still be
used to determine whether or not to use RemoteLazyInputStream when serializing
from the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D141038
2022-05-05 23:34:20 +00:00
Nika Layzell df13742edb Bug 1759563 - Add SerializedComplexity to limit the complexity of serialized IPCStream instances, r=asuth,necko-reviewers,dragana
This will improve the efficiency of serializing large data pipes, which in bad
cases can end up serializing very small amounts of data in individual pipes
over IPC, and acts as a compliment to the existing logic for limiting
serialized message sizes. It is also necessary for the changes in bug 1754004,
which require the ability to include FileDescriptor inline in the message,
which could blow out our FileDescriptor count limits if pipe creation was
unlimited.

In some tests, this change reduces the number of pipes required to serialize a
nsIInputStream from over 5000 to 1.

Differential Revision: https://phabricator.services.mozilla.com/D141036
2022-05-05 23:34:19 +00:00
Nika Layzell 5bf606fa92 Bug 1754031 - AsyncWait implementations should support updating flags on an existing listener, r=asuth,necko-reviewers,dragana
This operation is often performed by nsAStreamCopier when switching
between the source and sink streams, in order to enable or disable the
WAIT_CLOSURE_ONLY flag. Failing to reset the wait flags can lead to a
NS_AsyncCopy hanging until the source or sink are closed when is
alternating between waiting on input and output streams. This patch
relaxes the incorrect checks on various input streams.

Differential Revision: https://phabricator.services.mozilla.com/D141034
2022-05-05 23:34:19 +00:00
Norisz Fay 72abc132d8 Backed out 4 changesets (bug 1754031, bug 1759563, bug 1759572, bug 1759569) because they are linked to the backed out bug 1754004 CLOSED TREE
Backed out changeset a15de342dab9 (bug 1759572)
Backed out changeset e731c9fa7444 (bug 1759563)
Backed out changeset d70810d7b63a (bug 1759569)
Backed out changeset 14a5f40fc11d (bug 1754031)
2022-05-05 13:58:04 +03:00
Sebastian Hengst 7ddbeea9d6 Backed out 17 changesets (bug 1696894, bug 1754004) for causing crashes e.g. bug 1767808, and hanging Gmail (bug 1767918). a=backout DONTBUILD
Backed out changeset 63f17a06eba9 (bug 1754004)
Backed out changeset 017e1552d549 (bug 1754004)
Backed out changeset 010dfd821cf3 (bug 1696894)
Backed out changeset 96a39c2ba7a3 (bug 1754004)
Backed out changeset a147df47a0e3 (bug 1754004)
Backed out changeset 9018dd592230 (bug 1754004)
Backed out changeset 234ff9e092c2 (bug 1754004)
Backed out changeset c4f1e86992b6 (bug 1754004)
Backed out changeset 51bd50b57dd5 (bug 1754004)
Backed out changeset d95e7ad0eafa (bug 1754004)
Backed out changeset 35a69828091c (bug 1754004)
Backed out changeset 6802a4326963 (bug 1754004)
Backed out changeset e40e810e18fc (bug 1754004)
Backed out changeset 82b38c12b298 (bug 1754004)
Backed out changeset 0a6cf0817bf5 (bug 1754004)
Backed out changeset 6d8e51b3e8d7 (bug 1754004)
Backed out changeset 2059c2d0d880 (bug 1754004)
2022-05-05 11:27:42 +02:00
Nika Layzell 57997381f5 Bug 1754004 - Part 11: Simplify the IPCStream serialization API, r=asuth,necko-reviewers,kershaw
As serializing IPCStream no longer requires a manager or FileDescriptor array,
the arguments are no longer necessary, and can be removed. The AutoIPCStream
helper can also be removed, as managed actors are no longer used for
serialization, so a delayed start callback is not necessary.

The delayed start parameter is also removed from nsIIPCSerializableInputStream
instances, but is still present as `aAllowLazy` on the toplevel serialization
methods.

Differential Revision: https://phabricator.services.mozilla.com/D141048
2022-05-03 23:30:36 +00:00
Nika Layzell fa60fb91de Bug 1754004 - Part 3: Move RemoteLazyInputStream to its own toplevel protocol, r=asuth,necko-reviewers,dragana
This is a complete rewrite of RemoteLazyInputStream to run off of its own
toplevel protocol, rather than being managed by other protocols like
PBackground or PContent. This should improve performance thanks to no longer
needing to operate on a main or worker thread, and due to no longer needing the
migration step for the stream actor.

This also acts as a step towards no longer requiring a manager actor to
serialize input streams, as the type is now actor-agnostic, and should support
being sent over IPC between any pair of processes.

Differential Revision: https://phabricator.services.mozilla.com/D141040
2022-05-03 23:30:33 +00:00
Nika Layzell 310e31989e Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-03 23:30:32 +00:00
Nika Layzell a14f23b6d7 Bug 1754004 - Part 1: Switch IPCStream to use DataPipe instead of P{ChildToParent,ParentToChild}Stream, r=asuth,necko-reviewers,kershaw
This gives us various positive benefits, such as using a shared memory ring
buffer for faster communication, not having data streaming being bound to the
thread which transferred the nsIInputStream (which is often the main thread),
and the ability for some backpressure to be applied to data streaming.

After this change, the "delayed start" parameter for IPCStream serialization is
less relevant, as backpressure will serve a similar purpose. It will still be
used to determine whether or not to use RemoteLazyInputStream when serializing
from the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D141038
2022-05-03 23:30:32 +00:00
Nika Layzell 9b0c0be96e Bug 1759563 - Add SerializedComplexity to limit the complexity of serialized IPCStream instances, r=asuth,necko-reviewers,dragana
This will improve the efficiency of serializing large data pipes, which in bad
cases can end up serializing very small amounts of data in individual pipes
over IPC, and acts as a compliment to the existing logic for limiting
serialized message sizes. It is also necessary for the changes in bug 1754004,
which require the ability to include FileDescriptor inline in the message,
which could blow out our FileDescriptor count limits if pipe creation was
unlimited.

In some tests, this change reduces the number of pipes required to serialize a
nsIInputStream from over 5000 to 1.

Differential Revision: https://phabricator.services.mozilla.com/D141036
2022-05-03 23:30:31 +00:00