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

105 Коммитов

Автор SHA1 Сообщение Дата
Alex Gaynor 0f01791ffc Bug 1512990 - Part 4 - remove declarations of Recv/Answer methods from IPDL protocol base class; r=froydnj
For cases where the class has direct calls (that is, we cast `this` to the
subclass before making the call) no longer declare Recv/Answer methods on the
base class at all. This should ensure that slots for them are not generated in
vtables, and also allow the derived class to choose the method signature (e.g.
whether it wants to take something by reference or by value).

Differential Revision: https://phabricator.services.mozilla.com/D18132

--HG--
extra : moz-landing-system : lando
2019-02-06 15:58:43 +00:00
Alex Gaynor 984f0333ea Bug 1512990 - Part 3 - remove declarations of Alloc/Dealloc methods from IPDL protocol base class; r=froydnj
For cases where the class has direct calls (that is, we cast `this` to the
subclass before making the call) no longer declare Alloc/Dealloc methods on the
base class at all. This should ensure that slots for them are not generated in
vtables, and also allow the derived class to choose the method signature (e.g.
whether it wants to take something by reference or by value).

Differential Revision: https://phabricator.services.mozilla.com/D18131

--HG--
extra : moz-landing-system : lando
2019-02-06 15:58:07 +00:00
Alex Gaynor 75c7d1fa76 Bug 1512990 - Part 2 - implement direct calls in the IPDL compiler; r=froydnj
When calling a Recv/Alloc/Dealloc method on most types, cast `this` to the
derived class.

There is a heuristic to figure out what the correct derived type is. There is a
blacklist of types which we can't do direct calls on for the moment, as well as
an override for types that do work with direct calls but which don't match the
heuristic.

Differential Revision: https://phabricator.services.mozilla.com/D16492

--HG--
extra : moz-landing-system : lando
2019-02-06 15:57:37 +00:00
Nika Layzell be5f88174d Bug 1467223 - Part 1: Move CrossProcessRedirect Message to PContent, r=valentin
This is needed because early in a content process's lifecycle, NeckoParent may
not have been created yet. This leads to issues when trying to redirect into a
fresh process which hasn't performed network loads yet. By sending the message
over PContent, we can be sure the APIs are available.

Differential Revision: https://phabricator.services.mozilla.com/D15608

--HG--
extra : moz-landing-system : lando
2019-01-23 21:27:44 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Valentin Gosu 8e3e7b2a3e Bug 1510715 - Backed out changeset d15f0ac561d9 (bug 1260527) a=backout 2018-11-28 21:40:35 +01:00
Valentin Gosu a6efc6d0af Bug 1260527 - Change HttpChannelChild to open IPDL earlier than AsyncOpen r=kershaw,dragana
Since we need the loadInfo to set up the IPDL connection, we move the logic to
do so from HttpChannelChild::AsyncOpen to HttpChannelChild::SetLoadInfo
via InitIPCChannel.
It would have been nicer to do so in HttpChannelChild::Init, but
I ran into issues with view-source channels, which required an ugly hack.

Also note that RemoteChannelExists() preserves the existing contract - it is
true between asyncOpen and onStopRequest - but the name is slightly off, as
the channel has already been open by the time we call asyncOpen. We will fix
this in a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D12419

--HG--
extra : moz-landing-system : lando
2018-11-26 17:38:42 +00:00
Paul Vitale 09f4c06235 Bug 1203503 - part 2. replace proxy tunnel with new ipc-based tunnel r+bwc, r+mayhemer
This replaces the tunnel using a new nr_socket implementation.  Proxy detection
code is still done in the peer connction.  However, the result is only used to
detect a proxy.  The result is unused.  Address resolution is done by necko code
in the parent process.  The new socket wraps a WebrtcProxyChannel which uses
necko to handle proxy negotiation.  This has a happy side effect of enabling all
authentication modes that necko already supports for http proxies.

This adds a protocol for Necko to manage, WebrtcProxyChannel.  This new protocol
serves as a pipe for a CONNECT tunnel.  It is only used in WebRtc and not built
in no WebRtc builds.

--HG--
extra : rebase_source : a951841f95eaaa0562886cf76b405b01f1adf70e
extra : intermediate-source : 5c3da21957fc80b07188bc8a405437b858027a22
extra : source : 594a32883463ab051677ba06e22fa6d062b4b4a9
2018-06-05 12:10:16 -05:00
Andrea Marchesini c78617e1a8 Bug 1499995 - part 2 - TrackingDummyChannel must expose nsIHttpChannelInternal, r=ehsan, r=mayhemer 2018-10-25 10:44:12 +02:00
Andrea Marchesini dc8ad03720 Bug 1495285 - Introduce TrackingDummyChannel to annotate channels before being intercepted by ServiceWorkers, r=francois, r=mayhemer, f=asuth 2018-10-12 11:40:36 +02:00
Valentin Gosu a2675e9878 Bug 1476996 - Implement cross process redirection in Http on the parent process r=bagder,nika
This patch builds the foundation for the ability to relocate HTTP channels from one content process to another in order to ensure that origins are properly isolated. This relocation would normally occur when the response to an HTTP request is a redirect to a different origin.
The patch merely adds the mechanism for relocating the channel, rather than the logic of doing so. This will be provided in a follow-up patch by a specialized service. Right now that functionality is mocked in the test.

How this works:
In nsHttpChannel::OnStartRequest we will query the service that decides whether we need to direct the response to another process. If so, it will return a promise that resolves to a TabParent.
When the promise resolves, in HttpChannelParentListener::TriggerCrossProcessRedirect we call NeckoParent::SendCrossProcessRedirect passing along the required information to recreate the channel in the new process. The NeckoChild in the new process will then instantiate a new channel, call ConnectParent() which creates the associated parent channel, and connects it with the existing nsHttpChannel.
A listener in the new process is then notified of the existence of the new channel. It is required to call completeRedirectSetup on the channel, passing an nsIStreamListener to the call.
We then finish the entire operation with a call to HttpChannelChild::SendCrossProcessRedirectDone which causes us to close the old HttpChannelChild in the previous process and to resume the nsHttpChannel in the main process.

Differential Revision: https://phabricator.services.mozilla.com/D2958

--HG--
rename : netwerk/test/browser/browser_cookie_sync_across_tabs.js => netwerk/test/browser/browser_cross_process_redirect.js
rename : dom/media/test/redirect.sjs => netwerk/test/browser/redirect.sjs
extra : moz-landing-system : lando
2018-09-04 20:45:22 +00:00
Gurzau Raul dfbefcc19f Backed out changeset 45605798ecfe (bug 1476996) for build bustage at netwerk/protocol/http/HttpChannelParentListener.cpp on a CLOSED TREE 2018-09-04 20:31:33 +03:00
Valentin Gosu 98ff61cc44 Bug 1476996 - Implement cross process redirection in Http on the parent process r=bagder,nika
This patch builds the foundation for the ability to relocate HTTP channels from one content process to another in order to ensure that origins are properly isolated. This relocation would normally occur when the response to an HTTP request is a redirect to a different origin.
The patch merely adds the mechanism for relocating the channel, rather than the logic of doing so. This will be provided in a follow-up patch by a specialized service. Right now that functionality is mocked in the test.

How this works:
In nsHttpChannel::OnStartRequest we will query the service that decides whether we need to direct the response to another process. If so, it will return a promise that resolves to a TabParent.
When the promise resolves, in HttpChannelParentListener::TriggerCrossProcessRedirect we call NeckoParent::SendCrossProcessRedirect passing along the required information to recreate the channel in the new process. The NeckoChild in the new process will then instantiate a new channel, call ConnectParent() which creates the associated parent channel, and connects it with the existing nsHttpChannel.
A listener in the new process is then notified of the existence of the new channel. It is required to call completeRedirectSetup on the channel, passing an nsIStreamListener to the call.
We then finish the entire operation with a call to HttpChannelChild::SendCrossProcessRedirectDone which causes us to close the old HttpChannelChild in the previous process and to resume the nsHttpChannel in the main process.

Differential Revision: https://phabricator.services.mozilla.com/D2958

--HG--
rename : netwerk/test/browser/browser_cookie_sync_across_tabs.js => netwerk/test/browser/browser_cross_process_redirect.js
rename : dom/media/test/redirect.sjs => netwerk/test/browser/redirect.sjs
extra : moz-landing-system : lando
2018-09-04 16:40:57 +00:00
Honza Bambas 8a9d38fe70 Bug 1442178 - Do a busy wait of socket poll() shortly after network change detection, r=dragana 2018-05-30 17:36:42 +03:00
Patrick McManus f18aa94399 Bug 1462357 - remove the channel and socket interface id r=bagder,baku
the id was a b2g feature only settable via chrome privd xhr and is no
longer active in the code base

MozReview-Commit-ID: 84GPNvhvjNb

--HG--
extra : rebase_source : ab5c2229b98e1407b8b74ef2ee00dcfea45e046a
2018-05-16 16:05:03 -04:00
Andi-Bogdan Postelnicu 3f2298c2f6 Bug 1457411 - Update netwerk module to make use of newer methods introduced with c++11 and c++14. r=valentin
MozReview-Commit-ID: 666LNaHyiuQ

--HG--
extra : rebase_source : f3a24e0342d8dcdf9020dd473bc6b1045cbc533b
2018-04-30 19:46:04 +03:00
Michal Novotny ee8f43208a Bug 1448476 - Cache entry corruption after writing the alternate data. r=honzab
When writing to alt-data output stream fails for whatever reason, we now try to
truncate alternative data and keep the original data instead of dooming the
whole entry. The patch also changes how is the predicted size passed to the
cache. Instead of a dedicated method it's now an argument of openOutputStream
and openAlternativeOutputStream methods which fail in case the entry would
exceed the allowed limit.
2018-04-25 07:01:00 +03:00
Nicholas Hurley d4f64ba24e Bug 1391467 - Remove --enable-necko-protocols. r=gps,valentin
This patch removes the ability to select which protocols you want
included in necko, a wholly untested configuration that is broken in
practice. We have no need of this kind of configurability in necko.

In addition, this removes the final vestiges of rtsp support, which was
originally removed in bug 1295885 but still had some stuff hanging
around behind some ifdefs (that were never true).

MozReview-Commit-ID: KOEaDmit2IL

--HG--
extra : rebase_source : f6c2fdb972aaba46e922cda801252dc953550b94
2017-08-17 17:30:57 -07:00
Shane Caraveo 824d3d0d57 Bug 1380186 implement SimpleChannel Parent/Child IPC, r=kmag,mayhemer
MozReview-Commit-ID: 8zgF2MLwdu2

--HG--
extra : rebase_source : a5adcddb0119b8308a7beef74df998263dc8b620
2017-07-27 13:34:54 -07:00
Nicholas Hurley 861e6a501e Bug 1345094 - make http redirects to file:// uris work under e10s. r=mayhemer
MozReview-Commit-ID: J4IheswoeMZ

--HG--
extra : rebase_source : 4af1354af026fc9be255ed2ef92164d5575f1d5d
2017-04-12 11:43:50 -07:00
Michael Froman f0c929ff2d Bug 1345511 - pt 2 - add IPC mechanism for getting stun addrs on main process. r=bwc
PStunAddrsRequest.ipdl defines the new IPC protocol to get stun
  addrs on the main process.
StunAddrsRequestChild requests the stun addrs from the parent.
StunAddrsRequestParent uses a static method on NrIceCtx to get the
  stun addrs from the STS thead and sends the addrs back to the
  child process.
NrIceStunAddr (nricestunaddr.{cpp|h}) wraps nr_local_addr and makes
  it easier to serialize/deserialize over IPC.
NrIceStunAddrMessageUtils follows the pattern used by other Necko
  IPC classes to define top-level serialization/deserialization
  calls used by the IPC framework.

Modifications under netwerk/ipc are to connect the new IPC
protocol to get stun addrs to PNecko since it is a network
related IPC protocol.

MozReview-Commit-ID: GyEapBe5krl

--HG--
extra : rebase_source : c650d6aa4f7928bcae6032424303869074a755d4
2017-03-21 19:59:05 -05:00
Tim Huang defed589eb Bug 1337893 - Part 2: Making the DNS cache be aware of originAttributes. r=valentin
MozReview-Commit-ID: EroJiwwkGHa

--HG--
extra : rebase_source : 409730ef008b02373cc547a890224371806fbf4c
2017-02-14 12:25:35 +08:00
Kan-Ru Chen f8100451db Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm
We will use the new type for the generated IPDL message handler
prototype to make sure correct error handling method is called.

MozReview-Commit-ID: AzVbApxFGZ0
2016-11-15 04:26:00 +01:00
Valentin Gosu 32a883b619 Bug 1307467 - Remove RemoteFileOpen, and all app:// related code from JAR channels. r=bagder
Removes things added in bug 815523

MozReview-Commit-ID: FuXQceHGLhf

--HG--
extra : rebase_source : 048132627fb1e7ef00a061c3173fdd049724936c
2016-10-21 00:08:57 +02:00
Valentin Gosu d746e122c8 Bug 1307491 - (Part 1) Remove support for per-app-offline in netwerk/ [nukeb2g] r=bagder
* * *
Bug 1307491 - Remove support for per-app-offline [nukeb2g] r=bagder

MozReview-Commit-ID: FoweWBv9QyE

--HG--
extra : rebase_source : 0f6e0f0d19f108c3aef8b25cb6d605ecd338ee2b
2016-10-17 03:54:46 +02:00
Valentin Gosu 76d2cd8b5d Bug 1231565 - (Part 2) Allow storing alternate data in the HTTP cache r=honzab
* Add PAltDataOutputStream.ipdl to be able to open an OutputStream to the cache entry in the child process
* AltDataOutputStreamChild/Parent are Main Thread only for now.
* Adds methods for reading and writing alt-data to nsICacheInfoChannel.idl
* Keep a ref of the cache entry after OnStopRequest in case the consumer tries to open the alt-data output stream

MozReview-Commit-ID: jlraDI97Hg
2016-04-11 05:17:02 +02:00
Nicholas Nethercote 37301e25ad Bug 1297300 - Add missing checks to GetSpec() calls in netwerk/. r=hurley,dragana.
--HG--
extra : rebase_source : 961a82fb6e723688837e5250f57121c14ca958cb
2016-08-26 16:40:57 +10:00
Jonas Sicking add35a6bd8 Bug 1263991 part 6: Add e10s support for incoming websocket connections to FlyWebPublishedServer. r=baku,michal 2016-06-07 02:46:03 -07:00
Carsten "Tomcat" Book 5a4b7e506f Backed out changeset 64fb728c174a (bug 1263991) 2016-06-07 12:10:23 +02:00
Jonas Sicking 9835b04168 Bug 1263991 part 6: Add e10s support for incoming websocket connections to FlyWebPublishedServer. r=baku,michal 2016-06-07 02:46:03 -07:00
Nicholas Hurley fd7a5d97b5 Bug 1016628 - Add prefetch abilities to the predictor. r=mayhemer 2016-04-21 12:32:30 -07:00
Nicholas Hurley ccbf76c675 Bug 1260498 - Make test_rel_preconnect work in e10s mode. r=mcmanus
MozReview-Commit-ID: 3PGA2N73foH

--HG--
extra : rebase_source : b3837c38a8bf1847d207ebfc2d3ce60ddf826a01
2016-03-28 16:43:01 -07:00
Andrea Marchesini 73c08ab413 Bug 1215092 - WebSocketEventService and WebSocket discovering - part 2 - Unique Serial number for WebSocketChannel in IPC, r=michal 2015-10-28 19:10:42 +00:00
Andrea Marchesini b121e7da05 Bug 1215092 - WebSocketEventService and WebSocket discovering - part 1 - Renaming WebSocketFrameService, r=michal
--HG--
rename : netwerk/protocol/websocket/PWebSocketFrameListener.ipdl => netwerk/protocol/websocket/PWebSocketEventListener.ipdl
rename : netwerk/protocol/websocket/WebSocketFrameListenerChild.cpp => netwerk/protocol/websocket/WebSocketEventListenerChild.cpp
rename : netwerk/protocol/websocket/WebSocketFrameListenerChild.h => netwerk/protocol/websocket/WebSocketEventListenerChild.h
rename : netwerk/protocol/websocket/WebSocketFrameListenerParent.cpp => netwerk/protocol/websocket/WebSocketEventListenerParent.cpp
rename : netwerk/protocol/websocket/WebSocketFrameListenerParent.h => netwerk/protocol/websocket/WebSocketEventListenerParent.h
rename : netwerk/protocol/websocket/WebSocketFrameService.cpp => netwerk/protocol/websocket/WebSocketEventService.cpp
rename : netwerk/protocol/websocket/WebSocketFrameService.h => netwerk/protocol/websocket/WebSocketEventService.h
rename : netwerk/protocol/websocket/nsIWebSocketFrameService.idl => netwerk/protocol/websocket/nsIWebSocketEventService.idl
2015-10-28 19:10:20 +00:00
Carsten "Tomcat" Book bc50966763 Backed out changeset 7393a036ce36 (bug 1215092) for failing on own tests on a CLOSED TREE
--HG--
rename : netwerk/protocol/websocket/PWebSocketEventListener.ipdl => netwerk/protocol/websocket/PWebSocketFrameListener.ipdl
rename : netwerk/protocol/websocket/WebSocketEventListenerChild.cpp => netwerk/protocol/websocket/WebSocketFrameListenerChild.cpp
rename : netwerk/protocol/websocket/WebSocketEventListenerChild.h => netwerk/protocol/websocket/WebSocketFrameListenerChild.h
rename : netwerk/protocol/websocket/WebSocketEventListenerParent.cpp => netwerk/protocol/websocket/WebSocketFrameListenerParent.cpp
rename : netwerk/protocol/websocket/WebSocketEventListenerParent.h => netwerk/protocol/websocket/WebSocketFrameListenerParent.h
rename : netwerk/protocol/websocket/WebSocketEventService.cpp => netwerk/protocol/websocket/WebSocketFrameService.cpp
rename : netwerk/protocol/websocket/WebSocketEventService.h => netwerk/protocol/websocket/WebSocketFrameService.h
rename : netwerk/protocol/websocket/nsIWebSocketEventService.idl => netwerk/protocol/websocket/nsIWebSocketFrameService.idl
2015-10-28 14:28:59 +01:00
Carsten "Tomcat" Book df5ef54deb Backed out changeset 2284c3e8c336 (bug 1215092) 2015-10-28 14:28:37 +01:00
Andrea Marchesini e0173ff60c Bug 1215092 - WebSocketEventService and WebSocket discovering - part 2 - Unique Serial number for WebSocketChannel in IPC, r=michal 2015-10-28 11:42:00 +00:00
Andrea Marchesini 4d8e79e969 Bug 1215092 - WebSocketEventService and WebSocket discovering - part 1 - Renaming WebSocketFrameService, r=michal
--HG--
rename : netwerk/protocol/websocket/PWebSocketFrameListener.ipdl => netwerk/protocol/websocket/PWebSocketEventListener.ipdl
rename : netwerk/protocol/websocket/WebSocketFrameListenerChild.cpp => netwerk/protocol/websocket/WebSocketEventListenerChild.cpp
rename : netwerk/protocol/websocket/WebSocketFrameListenerChild.h => netwerk/protocol/websocket/WebSocketEventListenerChild.h
rename : netwerk/protocol/websocket/WebSocketFrameListenerParent.cpp => netwerk/protocol/websocket/WebSocketEventListenerParent.cpp
rename : netwerk/protocol/websocket/WebSocketFrameListenerParent.h => netwerk/protocol/websocket/WebSocketEventListenerParent.h
rename : netwerk/protocol/websocket/WebSocketFrameService.cpp => netwerk/protocol/websocket/WebSocketEventService.cpp
rename : netwerk/protocol/websocket/WebSocketFrameService.h => netwerk/protocol/websocket/WebSocketEventService.h
rename : netwerk/protocol/websocket/nsIWebSocketFrameService.idl => netwerk/protocol/websocket/nsIWebSocketEventService.idl
2015-10-28 11:41:24 +00:00
Andrea Marchesini 5fb333826f Bug 1203802 - Websocket Frame Listener API for devtool Network Inspector - part 4 - IPC, r=michal 2015-10-26 15:31:00 +00:00
Josh Matthews fbb088e702 Bug 885982 - Part 3: Add e10s support to TCPSocket and TCPServerSocket. r=asuth,mayhemer,bz 2015-03-25 10:36:56 -04:00
Nicholas Hurley 16407ea724 Bug 1127618 - make push caches work in e10s. r=mcmanus r=froydnj IGNORE IDL
--HG--
extra : rebase_source : 24dd37c6eaec83a1776d77632b97106e8abb8015
2015-07-31 13:50:08 -07:00
Wes Kocher 98e5242831 Backed out changeset 2bdaed564656 (bug 1125961) for b2g emulator mochitest-21 failures starting in test_fetch_event_client_postmessage.html 2015-07-30 14:53:38 -07:00
Josh Matthews 77fd3928cf Bug 1125961 - Allow sending null PBrowser actors when there's a triggering principal which can be used for security checks. r=bkelly,ddamjano 2015-06-03 15:07:42 -04:00
Nicholas Hurley ff91c700ee Bug 959752 - Make the network predictor work under e10s. r=mcmanus 2015-06-18 11:23:00 +02:00
Ryan VanderMeulen 350215c93f Backed out changeset 068df0223a6c (bug 1125961) for e10s crashes.
CLOSED TREE
2015-06-15 15:27:53 -04:00
Josh Matthews e3e3f30ca2 Bug 1125961 - Allow sending null PBrowser actors when there's a triggering principal which can be used for security checks; r=dragana 2015-06-15 14:35:06 -04:00
Dragana Damjanovic 9441d5b1f1 Bug 935838 - Add per app network traffic statistics to the UDP socket. r=sicking, r=mayhemer 2015-04-08 15:35:00 -04:00
Blake Kaplan f1944c7299 Bug 1058551 - Support redirects to data: URIs. r=honza 2015-03-27 13:12:37 -07:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Ryan VanderMeulen 91323d7a02 Backed out changeset a1d51e3fea63 (bug 935838) for B2G test_udpsocket.html timeouts.
CLOSED TREE

--HG--
extra : rebase_source : c38820b067a8faf405bfae7f5b5fb1089bd29bbc
2015-03-09 16:35:06 -04:00