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

92 Коммитов

Автор SHA1 Сообщение Дата
serge-sans-paille 74f462c959 Bug 1733356 - Fix non-unified build errors in netwerk/ r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D170852
2023-02-28 10:20:16 +00:00
Cosmin Sabou b3b360096e Backed out 3 changesets (bug 1733356) for causing several hybrid bustages.
Backed out changeset 5398605eb0af (bug 1733356)
Backed out changeset dead7940f720 (bug 1733356)
Backed out changeset 97bab99ef206 (bug 1733356)
2023-02-24 19:08:18 +02:00
serge-sans-paille aade476c1e Bug 1733356 - Fix non-unified build errors in netwerk/ r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D170852
2023-02-24 10:41:25 +00:00
Norisz Fay b573807379 Backed out changeset 5876fd60bbe5 (bug 1733356) for causing bustages on Predictor.cpp CLOSED TREE 2023-02-24 12:09:07 +02:00
serge-sans-paille 2ec96999fa Bug 1733356 - Fix non-unified build errors in netwerk/ r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D170852
2023-02-24 08:40:49 +00:00
Andrew McCreight fa8bfd1245 Bug 1514936, part 2 - Drop the outer arguments from static components. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D146457
2022-05-17 20:24:19 +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 89567e0ee9 Bug 1754004 - Part 8: Remove SeekableStreamWrapper, r=asuth,necko-reviewers,kershaw
This type is no longer necessary, and has various issues due to behaving
incorrectly when used with async streams or streams which are not nsIPipe.

Differential Revision: https://phabricator.services.mozilla.com/D141045
2022-05-13 14:16:12 +00:00
Nika Layzell 0dbdab7c49 Bug 1754004 - Part 4: Stop requiring nsMIMEInputStream to be seekable, r=asuth,necko-reviewers,dragana
This type was originally made to be required to be seekable because a
non-seekable stream would lose the nsMIMEInputStream metadata information when
it was wrapped by the HTTP channel using PartiallySeekableInputStream, leading
to potential bugs.

Changes in a later part will change HTTP channel wrapping to ensure that this
metadata is preserved in all relevant cases, so this requirement can be
relaxed. This is important, as the check was previously being bypassed for
RemoteLazyInputStream in the content process, as nsBufferedInputStream would
incorrectly report that it implemented nsISeekableStream even if the underlying
stream wasn't seekable.

Differential Revision: https://phabricator.services.mozilla.com/D141041
2022-05-13 14:16:10 +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 a520c86f48 Bug 1754004 - Part 8: Remove SeekableStreamWrapper, r=asuth,necko-reviewers,kershaw
This type is no longer necessary, and has various issues due to behaving
incorrectly when used with async streams or streams which are not nsIPipe.

Differential Revision: https://phabricator.services.mozilla.com/D141045
2022-05-10 22:27:44 +00:00
Nika Layzell a54be9b854 Bug 1754004 - Part 4: Stop requiring nsMIMEInputStream to be seekable, r=asuth,necko-reviewers,dragana
This type was originally made to be required to be seekable because a
non-seekable stream would lose the nsMIMEInputStream metadata information when
it was wrapped by the HTTP channel using PartiallySeekableInputStream, leading
to potential bugs.

Changes in a later part will change HTTP channel wrapping to ensure that this
metadata is preserved in all relevant cases, so this requirement can be
relaxed. This is important, as the check was previously being bypassed for
RemoteLazyInputStream in the content process, as nsBufferedInputStream would
incorrectly report that it implemented nsISeekableStream even if the underlying
stream wasn't seekable.

Differential Revision: https://phabricator.services.mozilla.com/D141041
2022-05-10 22:27:43 +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
Norisz Fay bf243bc817 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 763329db47 Bug 1754004 - Part 8: Remove SeekableStreamWrapper, r=asuth,necko-reviewers,kershaw
This type is no longer necessary, and has various issues due to behaving
incorrectly when used with async streams or streams which are not nsIPipe.

Differential Revision: https://phabricator.services.mozilla.com/D141045
2022-05-03 23:30:35 +00:00
Nika Layzell 6aa5a74b4a Bug 1754004 - Part 4: Stop requiring nsMIMEInputStream to be seekable, r=asuth,necko-reviewers,dragana
This type was originally made to be required to be seekable because a
non-seekable stream would lose the nsMIMEInputStream metadata information when
it was wrapped by the HTTP channel using PartiallySeekableInputStream, leading
to potential bugs.

Changes in a later part will change HTTP channel wrapping to ensure that this
metadata is preserved in all relevant cases, so this requirement can be
relaxed. This is important, as the check was previously being bypassed for
RemoteLazyInputStream in the content process, as nsBufferedInputStream would
incorrectly report that it implemented nsISeekableStream even if the underlying
stream wasn't seekable.

Differential Revision: https://phabricator.services.mozilla.com/D141041
2022-05-03 23:30:33 +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
Nika Layzell 7bb4f24325 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-03 23:30:30 +00:00
Butkovits Atila d0dadcb6f5 Backed out 19 changesets (bug 1759569, bug 1754004, bug 1759563, bug 1754031, bug 1696894, bug 1759572) for causing wpt failures. CLOSED TREE
Backed out changeset 110a8dce4b5d (bug 1696894)
Backed out changeset a62dab05c6cd (bug 1754004)
Backed out changeset 7cf122f6e19f (bug 1754004)
Backed out changeset 2aa9a0a9adbc (bug 1754004)
Backed out changeset cde16b2cdbfb (bug 1754004)
Backed out changeset 452fe0a15c99 (bug 1754004)
Backed out changeset eace8d4756ef (bug 1754004)
Backed out changeset 5e1fad91e935 (bug 1754004)
Backed out changeset eb6de0b1ab8e (bug 1754004)
Backed out changeset 1ac1908ed3d0 (bug 1754004)
Backed out changeset 473cad5b22ab (bug 1754004)
Backed out changeset 1923922be138 (bug 1754004)
Backed out changeset c7966d91f89e (bug 1754004)
Backed out changeset df5ce1f6712c (bug 1754004)
Backed out changeset a3f3f9761ada (bug 1754004)
Backed out changeset c8ec86e0a33b (bug 1759572)
Backed out changeset 6c102f8e3d4a (bug 1759563)
Backed out changeset bd3a2fcf4f0c (bug 1759569)
Backed out changeset 2541d8face65 (bug 1754031)
2022-05-03 06:00:22 +03:00
Nika Layzell d88dc7e3db 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-02 20:44:26 +00:00
Nika Layzell 729882a135 Bug 1754004 - Part 8: Remove SeekableStreamWrapper, r=asuth,necko-reviewers,kershaw
This type is no longer necessary, and has various issues due to behaving
incorrectly when used with async streams or streams which are not nsIPipe.

Differential Revision: https://phabricator.services.mozilla.com/D141045
2022-05-02 20:44:25 +00:00
Nika Layzell edd5cb883a Bug 1754004 - Part 4: Stop requiring nsMIMEInputStream to be seekable, r=asuth,necko-reviewers,dragana
This type was originally made to be required to be seekable because a
non-seekable stream would lose the nsMIMEInputStream metadata information when
it was wrapped by the HTTP channel using PartiallySeekableInputStream, leading
to potential bugs.

Changes in a later part will change HTTP channel wrapping to ensure that this
metadata is preserved in all relevant cases, so this requirement can be
relaxed. This is important, as the check was previously being bypassed for
RemoteLazyInputStream in the content process, as nsBufferedInputStream would
incorrectly report that it implemented nsISeekableStream even if the underlying
stream wasn't seekable.

Differential Revision: https://phabricator.services.mozilla.com/D141041
2022-05-02 20:44:23 +00:00
Nika Layzell c5140538b7 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-02 20:44:21 +00:00
Nika Layzell 151a89349e 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-02 20:44:20 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Valentin Gosu cc8b1ac579 Bug 1735299 - Use fewer NS_ADDREF in netwerk/ r=nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D128176
2021-10-19 13:44:24 +00:00
Valentin Gosu 1a1f42da37 Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw
This changeset is the result of adding modernize-use-default-member-init to
tools/clang-tidy/config.yaml then proceeding to run
`./mach static-analysis check netwerk/ --fix`
I then went through the resulting fix and manually updated all of the member
variables which were missed due to them having a non-trivial constructor.

Note that the tool was only run on Linux, so code that only runs on some
platforms may have been missed.

The member variables that are still initialized in the contructor definition
are:
  - bitfields (not all currently supported compilers allow default-member-init
  - variables that are initialized via a parameter
  - variables that use code not visible in the header file

There are a few advantages to landing this change:
- fewer lines of code - now declaration is in the same place as initialization
  this also makes it easier to see when looking at the header.
- it makes it harder to miss initializing a member when adding a new contructor
- variables that depend on an include guard look much nicer now

Additionally I removed some unnecessary reinitialization of NetAddr members
(it has a constructor that does that now), and changed nsWifiScannerDBus to
use the thread-safe strtok_r instead of strtok.

Differential Revision: https://phabricator.services.mozilla.com/D116980
2021-06-11 07:10:41 +00:00
Csoregi Natalia 938a6943c6 Backed out changeset 6e00f8bd2acc (bug 1714307) for causing hazard bustage. CLOSED TREE 2021-06-09 21:50:03 +03:00
Valentin Gosu d1513f313e Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw
This changeset is the result of adding modernize-use-default-member-init to
tools/clang-tidy/config.yaml then proceeding to run
`./mach static-analysis check netwerk/ --fix`
I then went through the resulting fix and manually updated all of the member
variables which were missed due to them having a non-trivial constructor.

Note that the tool was only run on Linux, so code that only runs on some
platforms may have been missed.

The member variables that are still initialized in the contructor definition
are:
  - bitfields (not all currently supported compilers allow default-member-init
  - variables that are initialized via a parameter
  - variables that use code not visible in the header file

There are a few advantages to landing this change:
- fewer lines of code - now declaration is in the same place as initialization
  this also makes it easier to see when looking at the header.
- it makes it harder to miss initializing a member when adding a new contructor
- variables that depend on an include guard look much nicer now

Additionally I removed some unnecessary reinitialization of NetAddr members
(it has a constructor that does that now), and changed nsWifiScannerDBus to
use the thread-safe strtok_r instead of strtok.

Differential Revision: https://phabricator.services.mozilla.com/D116980
2021-06-09 10:20:04 +00:00
Valentin Gosu d595491cc7 Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 12:35:16 +00:00
Butkovits Atila 692bda1ca1 Backed out changeset c4b44c4ef15b (bug 1714307) for causing build bustages on nsHTTPCompressConv.h. CLOSED TREE 2021-06-04 13:53:37 +03:00
Valentin Gosu 98146ae90b Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 10:00:55 +00:00
Nika Layzell daf01f9769 Bug 1681529 - Part 10: Set StartedReading after calling SetData, r=baku,necko-reviewers,valentin
SetData will check that `mStartedReading` has not been set yet to ensure the
stream is in a non-partially-read state. This can lead to assertion failures
when sending a stream not seeked to the beginning over IPC.

Differential Revision: https://phabricator.services.mozilla.com/D103226
2021-02-04 18:13:19 +00:00
Nika Layzell 9de178dfae Bug 1681529 - Part 7: Wrap the inner streams in a nsMIMEInputStream to make them seekable, r=baku,necko-reviewers,dragana
nsMIMEInputStream has a requirement that the inner nsIInputStream object
implement nsISeekableStream, which is usually enforced by the SetData method.
This check was bypassed by the Deserialize method, which unfortunately meant
that non-seekable IPC payloads could end up within a nsMIMEInputStream when sent
from another process (e.g. due to large nsStringStreams being serialized as
nsPipes over IPC).

This patch uses the SeekableStreamWrapper introduced in the previous patch to
wrap the inner stream when deserializing nsMIMEInputStream, avoiding the
previously mentioned issue.

Differential Revision: https://phabricator.services.mozilla.com/D101806
2021-02-04 18:13:12 +00:00
Bogdan Tara abc7c8eeee Backed out 11 changesets (bug 1681529) for talos crashes CLOSED TREE
Backed out changeset c87d0f32d7a6 (bug 1681529)
Backed out changeset b1269f35d525 (bug 1681529)
Backed out changeset 29df8d4c984a (bug 1681529)
Backed out changeset 4def7578ced0 (bug 1681529)
Backed out changeset ce57c5a26c25 (bug 1681529)
Backed out changeset 78b186ec645a (bug 1681529)
Backed out changeset b1d1550a66ca (bug 1681529)
Backed out changeset e8620622208a (bug 1681529)
Backed out changeset 636b1a7c13e4 (bug 1681529)
Backed out changeset a5a8eac68b87 (bug 1681529)
Backed out changeset 968e17db71df (bug 1681529)
2021-02-03 09:29:38 +02:00
Nika Layzell d42f3a9fc3 Bug 1681529 - Part 10: Set StartedReading after calling SetData, r=baku,necko-reviewers,valentin
SetData will check that `mStartedReading` has not been set yet to ensure the
stream is in a non-partially-read state. This can lead to assertion failures
when sending a stream not seeked to the beginning over IPC.

Differential Revision: https://phabricator.services.mozilla.com/D103226
2021-02-02 23:26:43 +00:00
Nika Layzell f172ee476b Bug 1681529 - Part 7: Wrap the inner streams in a nsMIMEInputStream to make them seekable, r=baku,necko-reviewers,dragana
nsMIMEInputStream has a requirement that the inner nsIInputStream object
implement nsISeekableStream, which is usually enforced by the SetData method.
This check was bypassed by the Deserialize method, which unfortunately meant
that non-seekable IPC payloads could end up within a nsMIMEInputStream when sent
from another process (e.g. due to large nsStringStreams being serialized as
nsPipes over IPC).

This patch uses the SeekableStreamWrapper introduced in the previous patch to
wrap the inner stream when deserializing nsMIMEInputStream, avoiding the
previously mentioned issue.

Differential Revision: https://phabricator.services.mozilla.com/D101806
2021-02-02 23:26:36 +00:00
Brindusan Cristian cbdb020883 Backed out 11 changesets (bug 1681529) for mochitest failures at test_reload_large_postdata.html. CLOSED TREE
Backed out changeset f1f988155c82 (bug 1681529)
Backed out changeset f0ba367de05e (bug 1681529)
Backed out changeset dbea9952ec79 (bug 1681529)
Backed out changeset 6e185ec2c4a4 (bug 1681529)
Backed out changeset d0b11c08666a (bug 1681529)
Backed out changeset f2515096b378 (bug 1681529)
Backed out changeset ecd8c3b8fdb4 (bug 1681529)
Backed out changeset 7ea2e9cc8bad (bug 1681529)
Backed out changeset dbc85d0bffaf (bug 1681529)
Backed out changeset f0893f544219 (bug 1681529)
Backed out changeset 91979e21aa8e (bug 1681529)
2021-02-02 22:02:59 +02:00
Nika Layzell f918e191b0 Bug 1681529 - Part 10: Set StartedReading after calling SetData, r=baku,necko-reviewers,valentin
SetData will check that `mStartedReading` has not been set yet to ensure the
stream is in a non-partially-read state. This can lead to assertion failures
when sending a stream not seeked to the beginning over IPC.

Differential Revision: https://phabricator.services.mozilla.com/D103226
2021-01-29 19:04:03 +00:00
Nika Layzell 55c9ceedc7 Bug 1681529 - Part 7: Wrap the inner streams in a nsMIMEInputStream to make them seekable, r=baku,necko-reviewers,dragana
nsMIMEInputStream has a requirement that the inner nsIInputStream object
implement nsISeekableStream, which is usually enforced by the SetData method.
This check was bypassed by the Deserialize method, which unfortunately meant
that non-seekable IPC payloads could end up within a nsMIMEInputStream when sent
from another process (e.g. due to large nsStringStreams being serialized as
nsPipes over IPC).

This patch uses the SeekableStreamWrapper introduced in the previous patch to
wrap the inner stream when deserializing nsMIMEInputStream, avoiding the
previously mentioned issue.

Differential Revision: https://phabricator.services.mozilla.com/D101806
2021-01-27 21:55:19 +00:00