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

696 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 25c0d10932 Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
Gregory Pappas b5e625fdb8 Bug 1052909 - Remove network.websocket.auto-follow-http-redirects pref r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D189875
2023-10-04 16:21:45 +00:00
Peter Van der Beken 08dd6a2c2b Bug 1690111 - Improve nsIRandomGenerator APIs. r=mccr8,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D185067
2023-09-20 09:41:58 +00:00
Cosmin Sabou 680b4364c7 Backed out 13 changesets (bug 1690111) for causing fetch related crashes.
Backed out changeset 5f2c25d194ad (bug 1690111)
Backed out changeset 76c408bcd053 (bug 1690111)
Backed out changeset 6d0649fdafff (bug 1690111)
Backed out changeset c1330b5e8c43 (bug 1690111)
Backed out changeset 5fa36d8fd2a5 (bug 1690111)
Backed out changeset daf7d747853a (bug 1690111)
Backed out changeset f70e09a7f5c6 (bug 1690111)
Backed out changeset 40c6d6eed7f8 (bug 1690111)
Backed out changeset 692f2a759573 (bug 1690111)
Backed out changeset 7140866dd9f6 (bug 1690111)
Backed out changeset 2865fe682139 (bug 1690111)
Backed out changeset 9dcd2416f8a5 (bug 1690111)
Backed out changeset 9c411bf84079 (bug 1690111)
2023-09-11 17:55:24 +03:00
Peter Van der Beken 78f126e4be Bug 1690111 - Improve nsIRandomGenerator APIs. r=mccr8,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D185067
2023-09-11 12:52:18 +00:00
Kershaw Chang da7bf5ad67 Bug 1758155 - Make PWebSocketConnection a toplevel actor, r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D185031
2023-08-31 11:45:04 +00:00
Cristian Tuns bc5116b463 Backed out 4 changesets (bug 1758155) for causing build bustages in NetworkConnectivityService.cpp CLOSED TREE
Backed out changeset bec8e6762e2a (bug 1758155)
Backed out changeset 230add1b5bb5 (bug 1758155)
Backed out changeset 4bc26c75c26a (bug 1758155)
Backed out changeset 7b628b437e19 (bug 1758155)
2023-08-16 10:32:03 -04:00
Kershaw Chang e247e6006d Bug 1758155 - PBackground clenup, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D185032
2023-08-16 13:13:31 +00:00
Kershaw Chang 37b27a28d1 Bug 1758155 - Make PWebSocketConnection a toplevel actor, r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D185031
2023-08-16 13:13:31 +00:00
Manuel Bucher 43f8338f9c Bug 1842754 - Make LoadInfoArgs non-optional over IPC r=necko-reviewers,jesup
This makes all occurences of LoadInfoArgs non-optional also when
converting between nsILoadInfo in BackgroundUtils.h.

Differential Revision: https://phabricator.services.mozilla.com/D185299
2023-08-11 13:45:25 +00:00
Natalia Csoregi d2ed1b1ca2 Backed out changeset 3c585e66b44b (bug 1842754) for causing Bug 1847904. CLOSED TREE 2023-08-09 19:35:08 +03:00
Manuel Bucher f37405ff24 Bug 1842754 - Make LoadInfoArgs non-optional over IPC r=necko-reviewers,jesup
This makes all occurences of LoadInfoArgs non-optional also when
converting between nsILoadInfo in BackgroundUtils.h.

Differential Revision: https://phabricator.services.mozilla.com/D185299
2023-08-08 14:37:19 +00:00
Iulian Moraru 98f7137dd1 Backed out changeset 05857d2111ba (bug 1842754) for causing build bustages on BackgroundUtils.cpp. CLOSED TREE 2023-08-08 13:51:28 +03:00
Manuel Bucher 25a2f89619 Bug 1842754 - Make LoadInfoArgs non-optional over IPC r=necko-reviewers,jesup
This makes all occurences of LoadInfoArgs non-optional also when
converting between nsILoadInfo in BackgroundUtils.h.

Differential Revision: https://phabricator.services.mozilla.com/D185299
2023-08-08 10:25:04 +00:00
Randell Jesup a182b5e317 Bug 1845205: Add locking around access to WebSocketChannel::mPMCECompressor r=kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D184868
2023-07-31 18:59:45 +00:00
Randell Jesup 8c05a72f32 Bug 1846080: WebSocket cleanup r=kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D184828
2023-07-31 18:59:45 +00:00
Nika Layzell 9f4d22f4e0 Bug 1826206 - Require nsISerialEventTarget for RetargetDeliveryTo, r=necko-reviewers,valentin
This avoids potential issues where multiple OnDataAvailable callbacks or
similar could theoretically be called concurrently on different
StreamTransportService threads when targeting the STS - these cases will
now target a TaskQueue on the STS instead, structurally ensuring serial
execution.

Differential Revision: https://phabricator.services.mozilla.com/D179984
2023-06-07 14:48:38 +00:00
Paul Zuehlcke c954168dcf Bug 1826293 - Remove pref privacy.partition.network_state.ws_connection_queue. r=hpeuckmann,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D174611
2023-04-04 13:32:34 +00:00
Nika Layzell c4bc184bac Bug 1814686 - Part 1b: Add nullable annotations to refcounted types in ipdl, r=ipc-reviewers,mccr8
Manual changes to make all refcounted types be marked as `nullable` after the
changes in part 1a. This was done without any investigation into whether the
actual types want to be nullable, in order to avoid code changes.

Differential Revision: https://phabricator.services.mozilla.com/D168889
2023-03-20 15:40:37 +00:00
Nika Layzell f47e7d485e Bug 1607634 - Part 4b: Changes for not-nullable actor types being wrapped in NotNull, r=ipc-reviewers,necko-reviewers,mccr8
These are the code changes required by the IPDL changes in part 4a.

Differential Revision: https://phabricator.services.mozilla.com/D168887
2023-03-20 15:40:36 +00:00
Iulian Moraru 801dae8f2c Backed out 14 changesets (bug 1607634, bug 1814683, bug 1815177, bug 1814686) for causing build bustages on MaybeStorageBase. CLOSED TREE
Backed out changeset ae1c0551cea5 (bug 1815177)
Backed out changeset a11cafaa1884 (bug 1814686)
Backed out changeset 621507521762 (bug 1814686)
Backed out changeset ad692c73e381 (bug 1814686)
Backed out changeset 3be031e503dc (bug 1607634)
Backed out changeset aebbaa145d2d (bug 1607634)
Backed out changeset 9aa1f346fe14 (bug 1607634)
Backed out changeset e3eb77ad55ca (bug 1607634)
Backed out changeset e60591e5d5cf (bug 1607634)
Backed out changeset 6e43042d204a (bug 1814683)
Backed out changeset 1706e88652d6 (bug 1814683)
Backed out changeset 6878a1590e91 (bug 1814683)
Backed out changeset b1c980c834d8 (bug 1814683)
Backed out changeset 94480b82d102 (bug 1814683)
2023-03-15 01:58:36 +02:00
Nika Layzell a07f4ca7c9 Bug 1814686 - Part 1b: Add nullable annotations to refcounted types in ipdl, r=ipc-reviewers,mccr8
Manual changes to make all refcounted types be marked as `nullable` after the
changes in part 1a. This was done without any investigation into whether the
actual types want to be nullable, in order to avoid code changes.

Differential Revision: https://phabricator.services.mozilla.com/D168889
2023-03-14 19:31:41 +00:00
Nika Layzell 462fc4e4ee Bug 1607634 - Part 4b: Changes for not-nullable actor types being wrapped in NotNull, r=ipc-reviewers,necko-reviewers,mccr8
These are the code changes required by the IPDL changes in part 4a.

Differential Revision: https://phabricator.services.mozilla.com/D168887
2023-03-14 19:31:40 +00:00
Kershaw Chang 39c740cfc0 Bug 1811047, r=necko-reviewers,valentin
When WebSocketConnectionParent::RecvOnError is called, we call WebSocketChannel::OnError and WebSocketChannel::CleanupConnection could be called.
In WebSocketChannel::CleanupConnection, WebSocketConnectionParent::Close will be called and the WebSocketChannel will be released (set mListener to null).
To avoid WebSocketChannel being released in WebSocketConnectionParent::Close, we don't need to set mListener to null.

Differential Revision: https://phabricator.services.mozilla.com/D170480
2023-02-22 15:39:58 +00:00
Nika Layzell 9d6bb19c23 Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8
This method always returned GetMainThreadSerialEventTarget(). This patch
switches all callers over to use that method instead.

We can't easily switch all calls to be calls to NS_GetMainThread(), as there is
no version of that method returning a bare nsIThread* instance.

I didn't introduce one, as we may want to add a lock around mMainThread in the
future, which would require removing nsThreadManager::GetMainThreadWeak. As
this method only returns nsISerialEventTarget, it method could remain
implemented, however, by returning a statically allocated fake event target
which forwards dispatches (and QIs to nsIThread) to the real main thread.

Differential Revision: https://phabricator.services.mozilla.com/D166608
2023-01-16 23:14:12 +00:00
Nika Layzell 852d02ec16 Bug 1809753 - Part 3: Replace all callers of GetCurrentEventTarget with GetCurrentSerialEventTarget, r=mccr8,necko-reviewers,valentin
This only changes the behaviour when called with a TaskQueue or other type
using SerialEventTargetGuard on the stack. They are being switched over as the
existing GetCurrentEventTarget method is being removed, as it is somewhat
confusing, and poorly documented.

Callers which need to get the current thread even when on a threadpool or
behind a TaskQueue were switched to GetCurrentEventTarget in the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D166607
2023-01-16 23:14:11 +00:00
Sandor Molnar 41b78439d0 Backed out 6 changesets (bug 1809752, bug 1809753) for causing perma failures in browser/components/firefoxview/tests/browser/browser_feature_callout_position.js
Backed out changeset ea05784d74c4 (bug 1809753)
Backed out changeset 7c9b20eebcc8 (bug 1809753)
Backed out changeset d0267ac2256d (bug 1809753)
Backed out changeset aa9f2971bd6f (bug 1809753)
Backed out changeset f0d9fcfaa6f8 (bug 1809752)
Backed out changeset 6d58c799cffe (bug 1809752)
2023-01-17 03:19:24 +02:00
Nika Layzell f7772bb6ae Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8
This method always returned GetMainThreadSerialEventTarget(). This patch
switches all callers over to use that method instead.

We can't easily switch all calls to be calls to NS_GetMainThread(), as there is
no version of that method returning a bare nsIThread* instance.

I didn't introduce one, as we may want to add a lock around mMainThread in the
future, which would require removing nsThreadManager::GetMainThreadWeak. As
this method only returns nsISerialEventTarget, it method could remain
implemented, however, by returning a statically allocated fake event target
which forwards dispatches (and QIs to nsIThread) to the real main thread.

Differential Revision: https://phabricator.services.mozilla.com/D166608
2023-01-16 23:14:12 +00:00
Nika Layzell 8d118308de Bug 1809753 - Part 3: Replace all callers of GetCurrentEventTarget with GetCurrentSerialEventTarget, r=mccr8,necko-reviewers,valentin
This only changes the behaviour when called with a TaskQueue or other type
using SerialEventTargetGuard on the stack. They are being switched over as the
existing GetCurrentEventTarget method is being removed, as it is somewhat
confusing, and poorly documented.

Callers which need to get the current thread even when on a threadpool or
behind a TaskQueue were switched to GetCurrentEventTarget in the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D166607
2023-01-16 23:14:11 +00:00
Tyler Paplham 0756ae67fb Bug 1805885 - Removed unnecessary functions NS_MaybeOpenChannelUsingOpen() and NS_MaybeOpenChannelUsingAsyncOpen(). Also refactored callers of these functions to not use them. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D166118
2023-01-08 20:58:54 +00:00
Kershaw Chang cf7a86f56a Bug 1807004 - Make WebSocketChannel::OnInputStreamReady always be called on IO thread, r=necko-reviewers,valentin
Since we passed a null target to `AsyncWait`, the [inputstream callback could be called directly](https://searchfox.org/mozilla-central/rev/7eca06dd4c5e4dfd6764a382569c841c05a0857d/xpcom/io/nsPipe3.cpp#118) on main thread. To avoid `WebSocketChannel::OnInputStreamReady` being called on main thread, we should pass `mIOThread` to `AsyncWait`.

Differential Revision: https://phabricator.services.mozilla.com/D165833
2023-01-03 09:20:51 +00:00
Sylvestre Ledru 1f8d23143a Bug 1802288 - remove trailing whitespaces in idl/webidl files r=credential-management-reviewers,webidl,smaug,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D165559
2022-12-28 09:52:44 +00:00
Valentin Gosu 21d7e0ba7e Bug 1596845 - Turn nsIDNSService dns flags into a cenum r=necko-reviewers,geckoview-reviewers,kershaw,m_kato
This allows us to use a consistent size for the dnsFlags field.
across different files (previously some would use uint16_t and some uint32_t).
It also improves type safety - making sure we don't pass in the wrong value
to DNSFlags.

Depends on D164856

Differential Revision: https://phabricator.services.mozilla.com/D164857
2022-12-23 09:26:17 +00:00
Marian-Vasile Laza 56b22ee0ba Backed out 9 changesets (bug 1596845) for causing xpcshell failures on test_trr_enterprise_policy.js. CLOSED TREE
Backed out changeset 231acfc052bb (bug 1596845)
Backed out changeset 7d02dad4d720 (bug 1596845)
Backed out changeset b0449eec2671 (bug 1596845)
Backed out changeset 5cd033c9ef7c (bug 1596845)
Backed out changeset 98d583f1d19e (bug 1596845)
Backed out changeset b78bc0049605 (bug 1596845)
Backed out changeset 88919aaff89b (bug 1596845)
Backed out changeset f4adb3e7b8e1 (bug 1596845)
Backed out changeset b171f7ac0b40 (bug 1596845)
2022-12-23 09:21:39 +02:00
Valentin Gosu 10723cc64f Bug 1596845 - Turn nsIDNSService dns flags into a cenum r=necko-reviewers,geckoview-reviewers,kershaw,m_kato
This allows us to use a consistent size for the dnsFlags field.
across different files (previously some would use uint16_t and some uint32_t).
It also improves type safety - making sure we don't pass in the wrong value
to DNSFlags.

Depends on D164856

Differential Revision: https://phabricator.services.mozilla.com/D164857
2022-12-23 01:20:04 +00:00
Sandor Molnar 56d5efdcae Backed out 9 changesets (bug 1596845) for causing mochitest failures in browser/base/content/test/about/browser_aboutCertError_telemetry.js
Backed out changeset eb1e34c3041f (bug 1596845)
Backed out changeset af6d41439c60 (bug 1596845)
Backed out changeset f1447dd8df04 (bug 1596845)
Backed out changeset a383f2bbcaae (bug 1596845)
Backed out changeset 950c66dd6133 (bug 1596845)
Backed out changeset ab300239fd69 (bug 1596845)
Backed out changeset 8e1fe024b680 (bug 1596845)
Backed out changeset 80e5048d1f35 (bug 1596845)
Backed out changeset b14a4910d73b (bug 1596845)
2022-12-23 00:56:35 +02:00
Valentin Gosu 2f3eb78f06 Bug 1596845 - Turn nsIDNSService dns flags into a cenum r=necko-reviewers,geckoview-reviewers,kershaw,m_kato
This allows us to use a consistent size for the dnsFlags field.
across different files (previously some would use uint16_t and some uint32_t).
It also improves type safety - making sure we don't pass in the wrong value
to DNSFlags.

Depends on D164856

Differential Revision: https://phabricator.services.mozilla.com/D164857
2022-12-22 21:16:07 +00:00
Kershaw Chang 31ed59d68a Bug 1767298 - Make the behavior of TLSTransportLayer more like SocketTransport, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D163438
2022-12-14 09:56:49 +00:00
Nika Layzell 1f06e7ba7b Bug 1793463 - Part 6: Remove nsIProtocolHandler.{defaultPort,protocolFlags}, r=necko-reviewers,valentin
This removes all implementations of these types. Some implementations in JS
code were also removed in the previous part, when updating tests to use
`Services.io.registerProtocolHandler`.

Code which used to access these members should go through the IOService now
instead.

Differential Revision: https://phabricator.services.mozilla.com/D162805
2022-12-01 15:43:19 +00:00
edgul 8001c448d1 Bug 1772213 - Refactored websockets to use Http2StreamTunnel for websocket over http2. r=kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D159541
2022-12-01 14:37:27 +00:00
Marian-Vasile Laza 7492025127 Backed out 7 changesets (bug 1793463) for causing bustages on nsIOService.cpp. CLOSED TREE
Backed out changeset 47c3acb30de2 (bug 1793463)
Backed out changeset 71afe900eb17 (bug 1793463)
Backed out changeset d168599a269e (bug 1793463)
Backed out changeset d0f18d300818 (bug 1793463)
Backed out changeset a116e6f089f2 (bug 1793463)
Backed out changeset eba1123c8b56 (bug 1793463)
Backed out changeset 68a3eb8a3057 (bug 1793463)
2022-12-01 02:30:02 +02:00
Nika Layzell 20db36cecb Bug 1793463 - Part 6: Remove nsIProtocolHandler.{defaultPort,protocolFlags}, r=necko-reviewers,valentin
This removes all implementations of these types. Some implementations in JS
code were also removed in the previous part, when updating tests to use
`Services.io.registerProtocolHandler`.

Code which used to access these members should go through the IOService now
instead.

Differential Revision: https://phabricator.services.mozilla.com/D162805
2022-11-30 18:13:43 +00:00
Nika Layzell 34e62a0d9c Bug 1538028 - Part 2: Track TriggeringRemoteType through nsDocShellLoadState and LoadInfo, r=smaug,ckerschb,necko-reviewers,valentin
This is done using slightly different mechanisms for each of LoadInfo and
nsDocShellLoadState, and will be used in the next part to validate document
loads based on the RemoteType responsible for the load.

For subresource loads, the TriggeringRemoteType is fairly straightforward - it
is the process which created the channel. We can handle this by getting the
current remote type when creating the channel, and then using the remote type
of the sending process when receiving the LoadInfo over IPC to either replace
the triggering remote type, or validate it.

For document loads, the situation is a bit more complex, as there are at least
3 (potentially-)different processes responsible for different parts of the
navigation:

 1. The "Triggering Process" is the process which provided the URI to load.
    This is also the process which provides the Triggering Principal. This is
    the process being tracked in this patch.

 2. The "Loading Process" is the process which actually creates the channel and
    starts the load. This may be the same as the triggering process, or may be
    a different process starting the navigation on behalf of the triggering
    process. In general this is the process hosting the current docshell,
    though it may be the parent process in the case of parent-initiated loads.

 3. The "Final Process" is the process which receives the response and renders
    the final document. This isn't known at channel creation time, and is
    determined by the result principal and process isolation policy.

This change uses a serializer and special field on nsDocShellLoadState to track
the "Triggering Process" for the load, even as the load state is serialized
between processes by tracking which loads were sent into which content
processes, and matching them up when the parent process sees them again. The
information is then copied into the LoadInfo before configuring the real
channel, so it can be used for security checks.

The "Triggering Process" is overridden to be the parent process for history
loads, as history loads are often started in processes which wouldn't normally
be able to navigate to those pages. This is OK thanks to the changes in part 1
which validate history loads against the real session history when SHIP is
enabled.

Differential Revision: https://phabricator.services.mozilla.com/D161198
2022-11-29 20:41:45 +00:00
Olli Pettay a7c140180a Bug 1801315, move some generic code to the baseclass, r=jesup,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D162423
2022-11-22 10:17:51 +00:00
Dana Keeler d8c65c4b8b Bug 1791633 - rename nsISSLSocketControl to nsITLSSocketControl and move it and nsITransportSecurityInfo to PSM r=necko-reviewers,kershaw
Depends on D160310

Differential Revision: https://phabricator.services.mozilla.com/D160311
2022-11-16 16:37:29 +00:00
Marian-Vasile Laza 9c44d165bb Backed out 3 changesets (bug 1791633) for causing bustages on TransportSecurityInfo.cpp. CLOSED TREE
Backed out changeset 23b864e14db0 (bug 1791633)
Backed out changeset 0bcba3375ec0 (bug 1791633)
Backed out changeset ab0ea0d68f5c (bug 1791633)
2022-11-15 23:51:58 +02:00
Dana Keeler 21ac70dabe Bug 1791633 - rename nsISSLSocketControl to nsITLSSocketControl and move it and nsITransportSecurityInfo to PSM r=necko-reviewers,kershaw
Depends on D160310

Differential Revision: https://phabricator.services.mozilla.com/D160311
2022-11-15 20:03:29 +00:00
Butkovits Atila f3f66bf7e5 Backed out 3 changesets (bug 1791633) for causing build bustages at nsHttpConnectionMgr.cpp:. CLOSED TREE
Backed out changeset ee9744982673 (bug 1791633)
Backed out changeset f5a4bfdaba40 (bug 1791633)
Backed out changeset f57131b9cfe2 (bug 1791633)
2022-11-15 08:07:16 +02:00
Dana Keeler e5e2d15c2f Bug 1791633 - rename nsISSLSocketControl to nsITLSSocketControl and move it and nsITransportSecurityInfo to PSM r=necko-reviewers,kershaw
Depends on D160310

Differential Revision: https://phabricator.services.mozilla.com/D160311
2022-11-15 05:34:40 +00:00
Kershaw Chang 70c69eda51 Bug 1794061 - WebSocketChannel::CleanupConnection should run on IO thread, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D158831
2022-10-18 07:13:19 +00:00