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

68 Коммитов

Автор SHA1 Сообщение Дата
Jean-Yves Avenard 4f53bc5dc3 Bug 1647133 - P3. Use nsISerialEventTarget where it's actually that. r=valentin
All uses are always the main thread and its derivative (obtained via EventTargetFor method) or nullptr.

Depends on D80421

Differential Revision: https://phabricator.services.mozilla.com/D80422
2020-06-22 11:13:24 +00:00
Simon Giesecke 61ad805d68 Bug 1626570 - Use CopyableTArray in ipdlc as member type for now. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D73685
2020-05-07 08:11:08 +00:00
Michael Froman 8f02f0cbfa Bug 1629529 - fix shutdown dispatch assert in WebrtcTCPSocket. r=bwc
If we're shutting down and mSocketThread is no longer accepting work,
this dispatch can fail.  As far as I can see, fully fixing this would
require changes to nsIThread in order to allow checking whether the
thread is shutting down.

Differential Revision: https://phabricator.services.mozilla.com/D71964
2020-04-24 15:37:39 +00:00
Narcis Beleuzu 903cd347ea Backed out changeset 9d1756abffd2 (bug 1629529) for bustages on WebrtcTCPSocket.cpp . CLOSED TREE 2020-04-24 05:14:40 +03:00
Michael Froman eb2222bf34 Bug 1629529 - fix shutdown dispatch assert in WebrtcTCPSocket. r=bwc
If we're shutting down and mSocketThread is no longer accepting work,
this dispatch can fail.  As far as I can see, fully fixing this would
require changes to nsIThread in order to allow checking whether the
thread is shutting down.

Differential Revision: https://phabricator.services.mozilla.com/D71964
2020-04-23 21:42:21 +00:00
Narcis Beleuzu b6a26db6c8 Backed out changeset fabb6fb27e8a (bug 1629529) for being an incorrect fix. CLOSED TREE 2020-04-23 20:54:55 +03:00
Michael Froman b5392b2074 Bug 1629529 - fix shutdown dispatch assert in WebrtcTCPSocket. r=bwc
If we're shutting down and mSocketThread is no longer accepting work,
this dispatch can fail.  As far as I can see, fully fixing this would
require changes to nsIThread in order to allow checking whether the
thread is shutting down.

Differential Revision: https://phabricator.services.mozilla.com/D71964
2020-04-22 14:33:01 +00:00
Emilio Cobos Álvarez 4b9fdf3d73 Bug 1627707 - Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. r=ckerschb
Mostly a matter of:

  rg -l '\->LoadingPrincipal' | xargs sed -i 's/->LoadingPrincipal/->GetLoadingPrincipal/g'

And then clang-format. But I tweaked manually nsHttpChannelAuthProvider (move
the variable where it's used, don't take a useless strong ref),
AddonContentPolicy (move the declaration of the variable to the if condition),
and BackgroundUtils (same).

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

--HG--
extra : moz-landing-system : lando
2020-04-06 18:57:36 +00:00
Cosmin Sabou d557e2ed22 Backed out 3 changesets (bug 1627707) for build bustages @ mozilla::net::LoadInfo.
Backed out changeset 65d6a90651ce (bug 1627707)
Backed out changeset 378ec30d9979 (bug 1627707)
Backed out changeset 058a19e11b06 (bug 1627707)
2020-04-06 20:07:04 +03:00
Emilio Cobos Álvarez 97872f2fee Bug 1627707 - Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. r=ckerschb
Mostly a matter of:

  rg -l '\->LoadingPrincipal' | xargs sed -i 's/->LoadingPrincipal/->GetLoadingPrincipal/g'

And then clang-format. But I tweaked manually nsHttpChannelAuthProvider (move
the variable where it's used, don't take a useless strong ref),
AddonContentPolicy (move the declaration of the variable to the if condition),
and BackgroundUtils (same).

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

--HG--
extra : moz-landing-system : lando
2020-04-06 16:00:43 +00:00
Simon Giesecke 810fd1f507 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in media. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D65494

--HG--
extra : moz-landing-system : lando
2020-03-06 09:21:47 +00:00
Simon Giesecke 9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 11:40:14 +00:00
Dorel Luca d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke 59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 18:05:38 +00:00
Gabriele Svelto 69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
Andreas Pehrson 8624ea2658 Bug 1212237 - s/nsIEventTarget/nsISerialEventTarget/ in media/webrtc. r=bwc
nsISerialEventTarget is more semantically accurate for these uses, as the
dispatched runnables cannot run in parallel. It also allows us to use
InvokeAsync in future patches, as that function only takes nsISerialEventTarget.

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

--HG--
extra : moz-landing-system : lando
2019-11-06 05:10:58 +00:00
Brindusan Cristian 56bcd62c3a Backed out 7 changesets (bug 1212237, bug 1588055) for mochitest failures at test_peerConnection_recordReceiveTrack.html.
Backed out changeset 15f2829db807 (bug 1588055)
Backed out changeset bbff556beb57 (bug 1588055)
Backed out changeset c3f52449c92c (bug 1212237)
Backed out changeset c23272ab755f (bug 1212237)
Backed out changeset 184b8485ae32 (bug 1212237)
Backed out changeset e406c203d2a9 (bug 1212237)
Backed out changeset 4adcbfd99da0 (bug 1212237)
2019-11-06 07:06:02 +02:00
Andreas Pehrson 0b04e39974 Bug 1212237 - s/nsIEventTarget/nsISerialEventTarget/ in media/webrtc. r=bwc
nsISerialEventTarget is more semantically accurate for these uses, as the
dispatched runnables cannot run in parallel. It also allows us to use
InvokeAsync in future patches, as that function only takes nsISerialEventTarget.

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

--HG--
extra : moz-landing-system : lando
2019-11-05 20:04:29 +00:00
Dan Minor 2ee8d689fe Bug 1567201 - Use Maybe rather than empty string for timedout queries; r=ng
Differential Revision: https://phabricator.services.mozilla.com/D47266

--HG--
extra : moz-landing-system : lando
2019-10-01 12:59:51 +00:00
Dan Minor 7e51c599cd Bug 1567201 - Join multicast group on all interfaces; r=mjf
We need to join the multicast group on all network interfaces or we may end up
missing packets. There is a limit on the number of groups joinable by a single
socket (20 on my Linux system) but it doesn't seem worth worrying about
hitting that limit at the moment as it seems unlikely that many users would
have more than 20 network interfaces on a system on which they are running
Firefox.

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

--HG--
extra : moz-landing-system : lando
2019-10-01 12:59:02 +00:00
Dan Minor 940a75c186 Bug 1567201 - Add mDNS query support to StunAddrsRequest; r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D46976

--HG--
extra : moz-landing-system : lando
2019-10-01 12:58:19 +00:00
Byron Campen [:bwc] 68c6661fe1 Bug 1583046: Tighten down threading rules. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D47086

--HG--
extra : moz-landing-system : lando
2019-09-26 15:15:33 +00:00
Byron Campen [:bwc] e429b89b10 Bug 1582646: Cancel proxy lookup when socket closes. r=mjf
Also, since OnProxyAvailable always happens on main regardless of the target we
set, don't bother setting the target.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 15:13:44 +00:00
Byron Campen [:bwc] abf0777414 Bug 1569183: Create an ipdl struct called WebrtcProxyConfig, to cut down on the arg count on lots of functions. r=mjf,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D45562

--HG--
extra : moz-landing-system : lando
2019-09-17 18:19:04 +00:00
Byron Campen [:bwc] fec8b0d807 Bug 1569183: Stop doing a proxy lookup to determine whether we're configured to use a proxy (for the proxy_only_if_behind_proxy pref), and instead look at whether we loaded the doc using a proxy. r=mjf,mayhemer,jld
Differential Revision: https://phabricator.services.mozilla.com/D45289

--HG--
extra : moz-landing-system : lando
2019-09-18 14:27:42 +00:00
Byron Campen [:bwc] 2fe90843a0 Bug 1569183: Update OnConnected callbacks to specify what type of proxying (if any) is being used, and implement IsProxied based on this information. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D45186

--HG--
extra : moz-landing-system : lando
2019-09-17 18:18:33 +00:00
Byron Campen [:bwc] fbfb9f6754 Bug 1569183: Make proxy config parameters optional in WebrtcTCPSocket to get the NAT simulator working again. r=mjf,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D45104

--HG--
extra : moz-landing-system : lando
2019-09-17 18:17:37 +00:00
Byron Campen [:bwc] 493161e6a3 Bug 1569183: Teach WebrtcTCPSocket to use TLS when configured to. r=mjf,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D45103

--HG--
extra : moz-landing-system : lando
2019-09-17 18:17:24 +00:00
Byron Campen [:bwc] 9e6bcf1480 Bug 1569183: Teach WebrtcTCPSocket to bind to a specific host/port. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D45102

--HG--
extra : moz-landing-system : lando
2019-09-17 18:17:18 +00:00
Byron Campen [:bwc] dbee4e76f5 Bug 1569183: Add a proxy policy argument to NrSocketProxyConfig, and always set this config on the NrIceCtx. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D45101

--HG--
extra : moz-landing-system : lando
2019-09-17 18:17:14 +00:00
Byron Campen [:bwc] ffa09cee72 Bug 1569183: Rename PWebrtcProxyChannel to PWebrtcTCPSocket. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D45098

--HG--
rename : media/mtransport/WebrtcProxyChannelWrapper.cpp => media/mtransport/WebrtcTCPSocketWrapper.cpp
rename : media/mtransport/WebrtcProxyChannelWrapper.h => media/mtransport/WebrtcTCPSocketWrapper.h
rename : media/mtransport/ipc/PWebrtcProxyChannel.ipdl => media/mtransport/ipc/PWebrtcTCPSocket.ipdl
rename : media/mtransport/ipc/WebrtcProxyChannel.cpp => media/mtransport/ipc/WebrtcTCPSocket.cpp
rename : media/mtransport/ipc/WebrtcProxyChannel.h => media/mtransport/ipc/WebrtcTCPSocket.h
rename : media/mtransport/ipc/WebrtcProxyChannelCallback.h => media/mtransport/ipc/WebrtcTCPSocketCallback.h
rename : media/mtransport/ipc/WebrtcProxyChannelChild.cpp => media/mtransport/ipc/WebrtcTCPSocketChild.cpp
rename : media/mtransport/ipc/WebrtcProxyChannelChild.h => media/mtransport/ipc/WebrtcTCPSocketChild.h
rename : media/mtransport/ipc/WebrtcProxyLog.cpp => media/mtransport/ipc/WebrtcTCPSocketLog.cpp
rename : media/mtransport/ipc/WebrtcProxyLog.h => media/mtransport/ipc/WebrtcTCPSocketLog.h
rename : media/mtransport/ipc/WebrtcProxyChannelParent.cpp => media/mtransport/ipc/WebrtcTCPSocketParent.cpp
rename : media/mtransport/ipc/WebrtcProxyChannelParent.h => media/mtransport/ipc/WebrtcTCPSocketParent.h
extra : moz-landing-system : lando
2019-09-17 18:15:41 +00:00
Byron Campen [:bwc] 5aea6ddbff Bug 1569183: Teach WebrtcProxyChannel to handle non-proxied TCP connections, and SOCKS proxying because that was easy to do also. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D45097

--HG--
extra : moz-landing-system : lando
2019-09-17 18:15:23 +00:00
Christian Holler d5d628a5fb Bug 1577571 - Add OnUpgradeFailed to nsIHttpUpgradeListener. r=michal
Differential Revision: https://phabricator.services.mozilla.com/D44680

--HG--
extra : moz-landing-system : lando
2019-09-05 12:10:27 +00:00
Dan Minor eae489fda9 Bug 1554976 - Use StunAddrs to set interface for mdns_service; r=mjf
The Rust get_if_addrs library previously used does not build on Android with
our build system. Since we're already using nICEr to determine the local
interface addresses, rather than fix the Rust library, we can use those
addresses to set the interface on which mdns_service listens.

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

--HG--
extra : moz-landing-system : lando
2019-08-28 19:51:18 +00:00
Dan Minor 2511d2ab0c Bug 1554976 - Make mDNS service a singleton; r=mjf
The current code causes one mDNS service to be created for each PeerConnection.
Due to Bug 1569311, the services persist until shutdown, which can lead to a
lot of mDNS threads running on sites which use WebRTC for fingerprinting. This
change makes it so we start at most one mDNS service.

I've filed Bug 1569955 to look at shutting down the mDNS service after the
last hostname is unregistered. As an alternative, if we fix Bug 1569311, we
could also use refcounting and stop the mDNS service after the last
StunAddrsRequestParent is freed.

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

--HG--
extra : moz-landing-system : lando
2019-08-28 19:50:51 +00:00
Dan Minor 6c39c9271f Bug 1554976 - Generate mDNS addresses in nricectx; r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D38493

--HG--
extra : moz-landing-system : lando
2019-08-28 19:49:24 +00:00
Dan Minor 6285d788cc Bug 1554976 - Add methods to register/unregister mDNS hostnames to StunAddrsRequestParent; r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D38492

--HG--
extra : moz-landing-system : lando
2019-08-28 19:49:12 +00:00
Gurzau Raul a6c5c5e3ac Backed out 14 changesets (bug 1554976) for Windows build bustages on a CLOSED TREE.
Backed out changeset a9b209d9d880 (bug 1554976)
Backed out changeset 27b4dddf9597 (bug 1554976)
Backed out changeset 3e16c10bb966 (bug 1554976)
Backed out changeset 6a404fca61dc (bug 1554976)
Backed out changeset 77c4e76c8130 (bug 1554976)
Backed out changeset 24f146b86cc4 (bug 1554976)
Backed out changeset b49b4326dcfd (bug 1554976)
Backed out changeset e2c837d1e0a0 (bug 1554976)
Backed out changeset 24728144c263 (bug 1554976)
Backed out changeset a099e69241a0 (bug 1554976)
Backed out changeset 0e34595c2680 (bug 1554976)
Backed out changeset a506bb40047e (bug 1554976)
Backed out changeset 513026415092 (bug 1554976)
Backed out changeset e0fc6a1d4332 (bug 1554976)
2019-08-28 18:10:11 +03:00
Dan Minor a81f8d6f24 Bug 1554976 - Use StunAddrs to set interface for mdns_service; r=mjf
The Rust get_if_addrs library previously used does not build on Android with
our build system. Since we're already using nICEr to determine the local
interface addresses, rather than fix the Rust library, we can use those
addresses to set the interface on which mdns_service listens.

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

--HG--
extra : moz-landing-system : lando
2019-08-28 13:12:26 +00:00
Dan Minor c3d8942d0f Bug 1554976 - Make mDNS service a singleton; r=mjf
The current code causes one mDNS service to be created for each PeerConnection.
Due to Bug 1569311, the services persist until shutdown, which can lead to a
lot of mDNS threads running on sites which use WebRTC for fingerprinting. This
change makes it so we start at most one mDNS service.

I've filed Bug 1569955 to look at shutting down the mDNS service after the
last hostname is unregistered. As an alternative, if we fix Bug 1569311, we
could also use refcounting and stop the mDNS service after the last
StunAddrsRequestParent is freed.

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

--HG--
extra : moz-landing-system : lando
2019-08-28 13:12:01 +00:00
Dan Minor 9fa62a0a55 Bug 1554976 - Generate mDNS addresses in nricectx; r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D38493

--HG--
extra : moz-landing-system : lando
2019-08-28 13:11:14 +00:00
Dan Minor 6803a86c10 Bug 1554976 - Add methods to register/unregister mDNS hostnames to StunAddrsRequestParent; r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D38492

--HG--
extra : moz-landing-system : lando
2019-08-28 13:11:11 +00:00
Kershaw Chang 5018d39958 Bug 1571987 - Forward proxy check request to parent process r=dragana,bwc
Differential Revision: https://phabricator.services.mozilla.com/D41004

--HG--
extra : moz-landing-system : lando
2019-08-24 05:37:00 +00:00
Andrea Marchesini cef26c06c6 Bug 1567892 - PeerConnectionMedia should use nsIProtocolProxyService on the parent process - PProxyConfigLookup IPC protocol, r=bwc,kershaw,jld
Differential Revision: https://phabricator.services.mozilla.com/D39010

--HG--
extra : moz-landing-system : lando
2019-07-29 12:27:59 +00:00
Andreea Pavel 14071390d5 Backed out 2 changesets (bug 1567892) for build bustages on a CLOSED TREE
Backed out changeset edcdfaa8a2b1 (bug 1567892)
Backed out changeset 3aef1ee02e9b (bug 1567892)
2019-07-25 08:26:29 +03:00
Andrea Marchesini 00f3ae963f Bug 1567892 - PeerConnectionMedia should use nsIProtocolProxyService on the parent process - part 2 - PProxyConfigLookup IPC protocol, r=bwc,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D39010

--HG--
extra : moz-landing-system : lando
2019-07-25 04:51:00 +00:00
Byron Campen [:bwc] fd880e95f8 Bug 1545827: Use TabId instead of PBrowserOrId, use LoadInfoArgs to avoid using the system principal on the socket process, and use PSocketProcess for the WebrtcProxyChannel when on the socket process. r=kershaw,mjf
Differential Revision: https://phabricator.services.mozilla.com/D28239

--HG--
extra : moz-landing-system : lando
2019-04-26 14:46:26 +00:00
Kershaw Chang 45ba7eb235 Bug 1544799 - Make PSocketProcess manage PWebrtcProxyChannel r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D28038

--HG--
extra : moz-landing-system : lando
2019-04-23 13:10:56 +00:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Alex Gaynor dccb3bee8b Bug 1531827 - replace OptionalLoadInfoArgs with LoadInfoArgs? in IPDL; r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D21722

--HG--
extra : moz-landing-system : lando
2019-03-04 06:30:00 +00:00