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

1817 Коммитов

Автор SHA1 Сообщение Дата
Dana Keeler 9e12ff8e96 Bug 1770869 - remove nsISSLSocketControl.clientCert r=jschanck,necko-reviewers,kershaw
This field isn't used any longer and removing it will make future changes
eaiser.

Differential Revision: https://phabricator.services.mozilla.com/D147227
2022-06-01 23:20:58 +00:00
Butkovits Atila 2b78c018fd Backed out 3 changesets (bug 1770869) for causing xpcshell failures at test_tls_server.js. CLOSED TREE
Backed out changeset 5c95392b800d (bug 1770869)
Backed out changeset 149d04a209b6 (bug 1770869)
Backed out changeset 5a138d047be1 (bug 1770869)
2022-06-02 00:18:26 +03:00
Dana Keeler 39015f9d16 Bug 1770869 - remove nsISSLSocketControl.clientCert r=jschanck,necko-reviewers,kershaw
This field isn't used any longer and removing it will make future changes
eaiser.

Differential Revision: https://phabricator.services.mozilla.com/D147227
2022-06-01 20:00:57 +00:00
Tim Huang bebf6a1109 Bug 1768193 - Part 1: Use maybe to hold mIsThirdPartyContextToTopWindow in LoadInfo. r=anti-tracking-reviewers,necko-reviewers,bvandersloot,kershaw
In order to know if the mIsThirdPartyContextToTopWindow was set in the
loadInfo of the channel, we use maybe to hold the value. So, we can know
if it was set before.

This patch also addes two methods in LoadInfo to clear and know if the
value is set.

Differential Revision: https://phabricator.services.mozilla.com/D146491
2022-05-24 08:17:28 +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 b8bbcfbc33 Bug 1769124 - Require Recv methods to return IPCResult, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D146243
2022-05-13 02:20:23 +00:00
Manuel Bucher b01d289292 Bug 1753730 - Add EarlyHintPreloader to load 103 Early Hint responses into the cache r=necko-reviewers,ckerschb,dragana,kershaw
Currently only same origin requests are preloaded and preloads in the
secure context. This may change in the future to match W3C decisions and
Chromes behavior.

Also only images get preloaded. This will change in the future to cover
asset types.

Currently the anchor isn't parsed correctly yet[1], so this will be
fixed in a future patch.

On non-2xx responses of the main document all ongoing preloads get
canceled. Already completed preloads don't get affected and are in the
cache.

It is currently untested whether unused preloads don't have side effects.

Another future patch should cover adding the preload to the devtools.

[1]: https://datatracker.ietf.org/doc/html/rfc8288#section-3.2

Differential Revision: https://phabricator.services.mozilla.com/D137885
2022-05-11 15:41:39 +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
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
Mike Hommey b539884bcf Bug 1766561 - Adapt formatting to the difference in ProcessId type across platforms. r=nika,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144911
2022-05-03 20:49:04 +00:00
Iulian Moraru f65b926595 Backed out 3 changesets (bug 1753730) for causing bc failures on browser_103_preload.js.
Backed out changeset 8f27dc8dbbe0 (bug 1753730)
Backed out changeset 3c25877d2660 (bug 1753730)
Backed out changeset 47787105e3ad (bug 1753730)
2022-05-03 23:24:34 +03:00
Manuel Bucher 2952cf8ce7 Bug 1753730 - Add EarlyHintPreloader to load 103 Early Hint responses into the cache r=necko-reviewers,ckerschb,dragana,kershaw
Currently only same origin requests are preloaded and preloads in the
secure context. This may change in the future to match W3C decisions and
Chromes behavior.

Also only images get preloaded. This will change in the future to cover
asset types.

Currently the anchor isn't parsed correctly yet[1], so this will be
fixed in a future patch.

On non-2xx responses of the main document all ongoing preloads get
canceled. Already completed preloads don't get affected and are in the
cache.

It is currently untested whether unused preloads don't have side effects.

Another future patch should cover adding the preload to the devtools.

[1]: https://datatracker.ietf.org/doc/html/rfc8288#section-3.2

Differential Revision: https://phabricator.services.mozilla.com/D137885
2022-05-03 19:24:42 +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 a0d4a06e24 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-02 20:44:23 +00:00
Nika Layzell 7cb1970841 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-02 20:44:22 +00:00
Nika Layzell ac6a0491c8 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-02 20:44:22 +00:00
edguloien ee944b4098 Bug 1758524 (WIP) - Implement the http priority incremental flag: added lint fixes and test coverage. Differential Revision: https://phabricator.services.mozilla.com/D142694 r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D142965
2022-04-29 18:36:16 +00:00
edguloien 16595acde2 Bug 1758524 (WIP) - Implement http priority flag r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D142694
2022-04-29 18:36:16 +00:00
Norisz Fay 8474c50534 Backed out changeset f169b2da1ffe (bug 1766132) for causing multiple failures CLOSED TREE 2022-04-28 21:05:16 +03:00
Peter Van der Beken a2c5c5d3b6 Bug 1766132 - Use right process behaviour with BFCache in parent. r=smaug
Because we rely on the process switching code for replacing the
frameloaders for BFCache in the parent, we need to force the process
switch behaviour to PROCESS_BEHAVIOR_STANDARD if BFCache in the parent
is on.

Differential Revision: https://phabricator.services.mozilla.com/D144518
2022-04-28 16:53:24 +00:00
Cristian Tuns 5b228e4c4c Backed out 2 changesets (bug 1758524) for causing xpcshell failures in test_http3_prio_disabled_wrap.js CLOSED TREE
Backed out changeset b0abbd5936af (bug 1758524)
Backed out changeset e65d3214649e (bug 1758524)
2022-04-28 12:42:11 -04:00
edguloien 0c090761b0 Bug 1758524 (WIP) - Implement the http priority incremental flag: added lint fixes and test coverage. Differential Revision: https://phabricator.services.mozilla.com/D142694 r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D142965
2022-04-28 15:40:33 +00:00
edguloien 7172c05d39 Bug 1758524 (WIP) - Implement http priority flag r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D142694
2022-04-28 15:40:33 +00:00
Nika Layzell 642b5e7837 Bug 1756980 - Part 3: Clarify "process switch" parameters in DocumentLoadListener, r=smaug
This clarifies some of the members and arguments which were used in
DocumentLoadListener to make them more clear, adding documentation.

In addition to the simplifications of logic and improved naming, this
patch also moves the responsibility of managing StreamFilterRequest out
of DisconnectListeners so that stream listeners behave more
consistently, as the existing flag doesn't map well to whether or not
they should be cleared.

This was kept seperate from part 1 as it is largely a clarity
improvement, and may make it harder to see the important changes in that
part.

Depends on D143676

Differential Revision: https://phabricator.services.mozilla.com/D144747
2022-04-27 15:22:01 +00:00
Nika Layzell e834665924 Bug 1756980 - Part 1: Redirect internally-handled attachment loads into new tabs, r=Gijs,smaug,necko-reviewers,dragana
This patch changes how we handle document loads which are being handled
internally but have Content-Disposition: attachment specified at the
DocumentLoadListener layer. This was done as process switching is
currently the only place during a load where we can change the target
BrowsingContext which the load will complete in.

The only situation where we should currently continue to deliver a
successful request to the default content-viewer despite
Content-Disposition: attachment being specified is when we choose to
handle a downloaded PDF internally, so this shouldn't impact other
cases.

The change is handled by forcing a process switch under the hood, and
opening a new browser window asynchronously to handle the process
switch, similar to how object and embed load upgrades are handled. This
is done using nsIBrowserDOMWindow to attempt to respect the user's
window opening preferences.

A small change to browser.js was also made to try to encourage the new
tab to be opened next to the previous tab, as well as to avoid starting
unnecessary new processes when creating the new browser window.

Differential Revision: https://phabricator.services.mozilla.com/D143675
2022-04-27 15:22:00 +00:00
Tom Ritter 41f8e427e9 Bug 1752332: Remove the shouldSanitizeFunction member r=KrisWright
In the following patch we are going to change the signature of
ShouldSanitizePreference to take a Pref object.  Pref is only
known to the Preferences compilation unit; so to keep this member
(whose signature will change) we would need to expose the Pref
class. However it will only be a forward declaration, one could
not construct a Pref object in e.g. the gtest.

It is simpler to just remove the member entirely and call
ShouldSanitizePreference unconditionally - the member was only
used for the gtest, and while the gtest will be less robust
because of this change, it will still do some testing.

Depends on D141419

Differential Revision: https://phabricator.services.mozilla.com/D141420
2022-04-27 12:57:38 +00:00
Tom Ritter cf5cc35a2d Bug 1752332: Make SerializePreferences correctly sanitize preferences r=KrisWright,necko-reviewers,dragana
To do the correct thing in Preferences::SerializePreferences
(which is used during subprocess startup) we need to know if
the destination process is a web content process or not.
We add parameters to
SharedPreferenceSerializer::SerializeToSharedMemory that let
us figure that out.

In Preferences::SerializePreferences we fix the call to
aShouldSanitizeFn to pass the correct destination.

Depends on D141415

Differential Revision: https://phabricator.services.mozilla.com/D141416
2022-04-27 12:57:37 +00:00
Tom Ritter ce8ed8e849 Bug 1752332: Rename ShouldSyncPreference to ShouldSanitizePreference r=KrisWright
This simplifies the number of negations needed,
and makes things easy to understand. I think
anyway; I know that without renaming it I made
several annoying-to-diagnose negation errors...

Depends on D141411

Differential Revision: https://phabricator.services.mozilla.com/D141412
2022-04-27 12:57:35 +00:00
Tom Ritter 32adae1779 Bug 1752332: Move ShouldSyncPreferences to Preferences module r=KrisWright
Depends on D141409

Differential Revision: https://phabricator.services.mozilla.com/D141410
2022-04-27 12:57:34 +00:00
Mike Hommey af7d5859d7 Bug 1766377 - Fix some sign-compare warnings by using ProcessId more consistently. r=nika,necko-reviewers,kershaw
dom/media/ipc/RDDProcessManager.cpp(320,21): error: comparison of integers of different signs: 'base::ProcessId' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
      gpuProcessPid != -1 ? gpuProcessPid : base::GetCurrentProcId();
      ~~~~~~~~~~~~~ ^  ~~
dom/media/ipc/RDDProcessManager.cpp(332,21): error: comparison of integers of different signs: 'base::ProcessId' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
  if (gpuProcessPid != -1) {
      ~~~~~~~~~~~~~ ^  ~~
gfx/layers/ipc/SharedSurfacesParent.cpp(360,38): error: comparison of integers of different signs: 'base::ProcessId' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
    if (!gpm || gpm->GPUProcessPid() != -1) {
                ~~~~~~~~~~~~~~~~~~~~ ^  ~~
ipc/glue/MessageChannel.cpp(2145,13): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'const base::ProcessId' (aka 'const unsigned long') [-Werror,-Wsign-compare]
    if (pid != base::kInvalidProcessId &&
        ~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144688
2022-04-27 07:45:19 +00:00
Butkovits Atila c891bf41e7 Backed out 17 changesets (bug 1752332) for causing crashes at JS::AutoAssertNoGC::AutoAssertNoGC(JSContext*). CLOSED TREE
Backed out changeset eaa4213b9e08 (bug 1752332)
Backed out changeset 2d794b61fbf7 (bug 1752332)
Backed out changeset 69cbec3e9a11 (bug 1752332)
Backed out changeset 022a68e8d603 (bug 1752332)
Backed out changeset 1ff8656b362d (bug 1752332)
Backed out changeset 46ea5b4f9ad3 (bug 1752332)
Backed out changeset e1dcb4c7cb88 (bug 1752332)
Backed out changeset f9d6bc72406f (bug 1752332)
Backed out changeset dd02b8ef0219 (bug 1752332)
Backed out changeset 3e60b77153a3 (bug 1752332)
Backed out changeset ce93b08837d2 (bug 1752332)
Backed out changeset d165042105ea (bug 1752332)
Backed out changeset 22b910308ecd (bug 1752332)
Backed out changeset d2e748ccd01c (bug 1752332)
Backed out changeset a89203990075 (bug 1752332)
Backed out changeset b580c2a3bac0 (bug 1752332)
Backed out changeset a2d5880b528f (bug 1752332)
2022-04-25 17:55:17 +03:00
Tom Ritter dbac0fccf2 Bug 1752332: Remove the shouldSanitizeFunction member r=KrisWright
In the following patch we are going to change the signature of
ShouldSanitizePreference to take a Pref object.  Pref is only
known to the Preferences compilation unit; so to keep this member
(whose signature will change) we would need to expose the Pref
class. However it will only be a forward declaration, one could
not construct a Pref object in e.g. the gtest.

It is simpler to just remove the member entirely and call
ShouldSanitizePreference unconditionally - the member was only
used for the gtest, and while the gtest will be less robust
because of this change, it will still do some testing.

Depends on D141419

Differential Revision: https://phabricator.services.mozilla.com/D141420
2022-04-25 13:54:03 +00:00
Tom Ritter 90b65f0b6f Bug 1752332: Make SerializePreferences correctly sanitize preferences r=KrisWright,necko-reviewers,dragana
To do the correct thing in Preferences::SerializePreferences
(which is used during subprocess startup) we need to know if
the destination process is a web content process or not.
We add parameters to
SharedPreferenceSerializer::SerializeToSharedMemory that let
us figure that out.

In Preferences::SerializePreferences we fix the call to
aShouldSanitizeFn to pass the correct destination.

Depends on D141415

Differential Revision: https://phabricator.services.mozilla.com/D141416
2022-04-25 13:54:02 +00:00
Tom Ritter e7d695f54c Bug 1752332: Rename ShouldSyncPreference to ShouldSanitizePreference r=KrisWright
This simplifies the number of negations needed,
and makes things easy to understand. I think
anyway; I know that without renaming it I made
several annoying-to-diagnose negation errors...

Depends on D141411

Differential Revision: https://phabricator.services.mozilla.com/D141412
2022-04-25 13:54:00 +00:00
Tom Ritter 4ef13ee7f8 Bug 1752332: Move ShouldSyncPreferences to Preferences module r=KrisWright
Depends on D141409

Differential Revision: https://phabricator.services.mozilla.com/D141410
2022-04-25 13:53:59 +00:00
Cristian Tuns 467d2abfd0 Backed out 16 changesets (bug 1752332) for causing gtest failures CLOSED TREE
Backed out changeset 2523f5463789 (bug 1752332)
Backed out changeset 8d2932869cbd (bug 1752332)
Backed out changeset 7d159898e81d (bug 1752332)
Backed out changeset 5b9bbe252fec (bug 1752332)
Backed out changeset aeb79413e987 (bug 1752332)
Backed out changeset c184c517de91 (bug 1752332)
Backed out changeset 1bc4f1780f37 (bug 1752332)
Backed out changeset 2b78f295d903 (bug 1752332)
Backed out changeset 21f015b60220 (bug 1752332)
Backed out changeset a74095dfe3da (bug 1752332)
Backed out changeset 4b04bf33486e (bug 1752332)
Backed out changeset 8566711743a8 (bug 1752332)
Backed out changeset eec507d87b2b (bug 1752332)
Backed out changeset ef50d2618c7f (bug 1752332)
Backed out changeset 1b4d316e7f20 (bug 1752332)
Backed out changeset e40a778cb93f (bug 1752332)
2022-04-20 17:23:11 -04:00
Tom Ritter 3313c98eaf Bug 1752332: Remove the shouldSanitizeFunction member r=KrisWright
In the following patch we are going to change the signature of
ShouldSanitizePreference to take a Pref object.  Pref is only
known to the Preferences compilation unit; so to keep this member
(whose signature will change) we would need to expose the Pref
class. However it will only be a forward declaration, one could
not construct a Pref object in e.g. the gtest.

It is simpler to just remove the member entirely and call
ShouldSanitizePreference unconditionally - the member was only
used for the gtest, and while the gtest will be less robust
because of this change, it will still do some testing.

Depends on D141419

Differential Revision: https://phabricator.services.mozilla.com/D141420
2022-04-20 20:21:47 +00:00
Tom Ritter 43277d4358 Bug 1752332: Make SerializePreferences correctly sanitize preferences r=KrisWright,necko-reviewers,dragana
To do the correct thing in Preferences::SerializePreferences
(which is used during subprocess startup) we need to know if
the destination process is a web content process or not.
We add parameters to
SharedPreferenceSerializer::SerializeToSharedMemory that let
us figure that out.

In Preferences::SerializePreferences we fix the call to
aShouldSanitizeFn to pass the correct destination.

Depends on D141415

Differential Revision: https://phabricator.services.mozilla.com/D141416
2022-04-20 20:21:46 +00:00