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

1087 Коммитов

Автор SHA1 Сообщение Дата
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
Byron Campen [:bwc] 213a5cff8c Bug 1634145: Avoid leaking nr_ice_sockets due to various kinds of failure. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D73287
2020-05-04 12:00:26 +00:00
Dan Minor d0b4c7e527 Bug 1626029 - Don't attempt to resend mDNS packets on EPERM; r=mjf
We currently retry sending queries on all failures to write to the socket on
the assumption that write errors represent transient errors. With this change,
we treat EPERM has a permanent error and drop queries if we see it. This is
not a problem when sending answers, as we don't retry in case of errors there,
on the assumption that the other side will retry their query in the future.

We do have code to limit the number of times we attempt an mDNS query, but we
didn't hit it in this case, because it only counts sends that are successful.

Differential Revision: https://phabricator.services.mozilla.com/D73492
2020-05-04 14:19:42 +00:00
Kershaw Chang 4db371a46e Bug 1512478 - Use sync IPC to get client auth data from parent process r=keeler,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D36911
2020-04-28 20:12:43 +00:00
Byron Campen [:bwc] 68ded2fc51 Bug 1629565: Some logging that was helpful. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D72243
2020-04-27 14:38:26 +00:00
Byron Campen [:bwc] ff27555ac8 Bug 1629565: Transition gathering state to "new" if a negotiation leaves us with no transports. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D72242
2020-04-27 14:40:00 +00:00
Byron Campen [:bwc] 638490970c Bug 1629565: Fix bug where rollback of local offer would stomp the pre-existing transport with a new one with the same ufrag/pwd. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D72240
2020-04-27 14:42:13 +00:00
Byron Campen [:bwc] c98c1674f6 Bug 1629565: Do not transition back to "gathering" if no gathering is needed. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D72238
2020-04-27 14:36:39 +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
Dan Minor b4a9997899 Bug 1624253 - Catch panic in mdns_service_generate_uuid; r=mjf
In rare cases, the random number generator can fail to initialize when
generating a v4 UUID, causing a panic and crash. This adds code to catch that
panic and return a nil (all zeros) UUID instead. Using a nil UUID seems better
from a user privacy perspective than failing to obfuscate the host address and
leaking it when it is expected to be hidden.

Longer term, we might want to switch over to using nsIUUIDGenerator, but that
would require changes to how the socket process is initialized.

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

--HG--
extra : moz-landing-system : lando
2020-04-08 14:20:38 +00:00
Andreas Farre 25ca8d7890 Bug 1620594 - Part 7: Remove TabGroup and SystemGroup. r=nika,bas
TabGroup never really made any difference in which thread something go
dispatched to. This was the intended use, but development of TabGroups
with abstract main threads never made it that far. The good thing is
that thish makes it safe to also remove to the SystemGroup and instead
switch all SystemGroup dispatches to dispatches to main thread.

Timers for setTimeout and workers were the sole users of wrapped and
throttled event targets, that those throttled queues have been moved
to the BrowsingContextGroup and are now accessed explicitly.

The SchedulerEventTarget has been removed, since there are no longer a
separate event target for every TaskCategory. Instead a
LabellingEventTarget has been added to DocGroup to handle the case
where an event is dispatched do DocGroup or when an AbstractThread is
created using a DocGroup. This means that we'll actually label more
events correctly with the DocGroup that they belong to.

DocGroups have also been moved to BrowsingContextGroup.

Depends on D67636

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:47 +00:00
Valentin Gosu f29e4186dd Bug 1625213 - Make txt records be resolved with onLookupComplete r=dragana
This patch makes nsIDNSByTypeRecord extend nsIDNSRecord, but implementations
will safely forward the nsIDNSRecord methods to `nullptr`, meaning they will
throw an error when called.

Consumers should try to QI the nsIDNSRecord to nsIDNSByTypeRecord (or any
future types) and use that.

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

--HG--
extra : moz-landing-system : lando
2020-04-07 12:39:45 +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
Michael Froman 3973d5ec78 Bug 1609124 - check for associated IP address on interface for ICE dualstack operation. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D69245

--HG--
extra : moz-landing-system : lando
2020-04-01 20:38:26 +00:00
André Bargull a08be4177e Bug 1625138 - Part 17: Replace mozilla::Decay with std::decay. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68372

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:15 +00:00
Byron Campen [:bwc] 4d035f7c82 Bug 1624458: Make sure we cancel callbacks in close. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D68042

--HG--
extra : moz-landing-system : lando
2020-03-24 16:19:42 +00:00
Nils Ohlmeier [:drno] 3961f9751a Bug 1615443: re-add DTLS protocol version telemetry. r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D62827

--HG--
extra : moz-landing-system : lando
2020-03-18 17:59:07 +00:00
Marcin Wojtczak e310487b92 Bug 1622759 - Don't fail when nr_interface_prioritizer_add_interface() returns R_ALREADY r=bwc
This allows us to continue adding remaining interfaces from addrs array and
makes sure nr_interface_prioritizer_sort_preference() is called at the end.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 16:54:07 +00:00
Sylvestre Ledru acd1b8f246 Bug 1622328 - mdns_service.h: Add the license r=dminor
Depends on D66809

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

--HG--
extra : moz-landing-system : lando
2020-03-13 21:25:43 +00:00
Kevin Jacobs 1f7860ca02 Bug 1621036 - Enable DTLS 1.3 supported_versions workaround for interop between pre/post-Fx75 WebRTC. r=mt
Enable the NSS workaround introduced in bug 1619102, for DTLS 1.3 WebRTC clients.

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

--HG--
extra : moz-landing-system : lando
2020-03-11 16:43:31 +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
Dan Minor ac11c8363f Bug 1616667 - Fix remaining clippy complaints; r=mjf
Depends on D64381

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

--HG--
extra : moz-landing-system : lando
2020-02-26 17:28:29 +00:00
Dan Minor d6bac2eaba Bug 1616667 - Add handle_mdns_socket function; r=mjf
Depends on D64380

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

--HG--
extra : moz-landing-system : lando
2020-02-26 17:22:08 +00:00
Dan Minor 6d49ac2885 Bug 1616667 - Add handle_queries function; r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D64380

--HG--
extra : moz-landing-system : lando
2020-02-26 17:24:17 +00:00
Michael Froman 2785473eb6 Bug 1618214 - fix slash character handling in nr_reg_is_valid. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D64378

--HG--
extra : moz-landing-system : lando
2020-02-26 15:31:00 +00:00
Eric Rahm b9ba9be64d Bug 1322095 - Part 1b: Update callbacks to support moved args and convert nsAutoPtr usage. r=jya
In order to support the update to move args when invoking callbacks we:
 - Convert anything that was using WrapRunnable with `nsAutoPtr` to `UniquePtr`
 - Convert anything that was using a non-const ref as a param to either a
   const ref or a by-val copy

Addtionally we convert the remaining `nsAutoPtr` usage to `UniquePtr`.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 22:43:53 +00:00
Eric Rahm 9f7262d417 Bug 1322095 - Part 1a: Move WrapRunnable's args when running. r=gerald
In order to support `UniquePtr` as an arg type for `WrapRunnable` as well as
avoid unnecessary copies in the future we need to switch to moving args when
invoking a runnable.

This updates `WrapRunnables` so that they move their args when running and
adds/updates some tests. To accomplish this `std::apply` is swapped in for our
bespoke implementation and `std::tuple` is used to hold the args. We then
`std::move` the args when `Run` is called. We also needed to support an r-value
`Class` param for the runnable method on a bound object versions could work
with `UniquePtr` as the holder class.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 22:43:42 +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
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Coroiu Cristina 73c0827187 Backed out 2 changesets (bug 1322095) for build bustage at dist/include/mtransport/runnable_utils.h on a CLOSED TREE
Backed out changeset 14e115ba7f12 (bug 1322095)
Backed out changeset 078c0fe497b7 (bug 1322095)
2020-01-23 19:50:51 +02:00
Eric Rahm e120eee6b8 Bug 1322095 - Part 1b: Update callbacks to support moved args and convert nsAutoPtr usage. r=jya
In order to support the update to move args when invoking callbacks we:
 - Convert anything that was using WrapRunnable with `nsAutoPtr` to `UniquePtr`
 - Convert anything that was using a non-const ref as a param to either a
   const ref or a by-val copy

Addtionally we convert the remaining `nsAutoPtr` usage to `UniquePtr`.

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

--HG--
extra : moz-landing-system : lando
2020-01-23 17:38:18 +00:00
Eric Rahm 4f8e57079b Bug 1322095 - Part 1a: Move WrapRunnable's args when running. r=jya
In order to support `UniquePtr` as an arg type for `WrapRunnable` as well as
avoid unnecessary copies in the future we need to switch to moving args when
invoking a runnable.

This updates `WrapRunnables` so that they move their args when running and
adds/updates some tests. To accomplish this `std::apply` is swapped in for our
bespoke implementation and `std::tuple` is used to hold the args. We then
`std::move` the args when `Run` is called. We also needed to support an r-value
`Class` param for the runnable method on a bound object versions could work
with `UniquePtr` as the holder class.

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

--HG--
extra : moz-landing-system : lando
2020-01-23 17:38:20 +00:00
Emilio Cobos Álvarez 256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
Sylvestre Ledru cc2040bf21 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:48:34 +00:00
Dorel Luca 506e65bcab Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru 6689a37527 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:16:39 +00:00
Dan Minor 0c5b64b1cf Bug 1605862 - Decrease UDP socket timeouts in mDNS service; r=mjf
The original values of 10ms were chosen arbitrarily. Decreasing the values may
help prevent shutdown hangs like those seen in Bug 1601992.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 12:23:08 +00:00
Dan Minor 2f4f6bd5a0 Bug 1607283 - Update WebRTC DTLS Telemetry; r=mt
We've already decided when to remove support for DTLS 1.0, so I don't think we
need to track DTLS version anymore. The DTLS and SRTP cipher probes are
intended to track cipher usage so we can remove less secure ciphers over time.
I had a look at the telemetry for these and I don't think there's a clear case
for removal at the moment, so we should renew these for now.

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

--HG--
extra : moz-landing-system : lando
2020-01-07 18:48:21 +00:00
Julian Seward b261ffc229 Bug 1589990 - STUN: stun_getifaddrs() can return uninitialised bits which are subsequently used. r=bwc.
In media/mtransport/third_party/nICEr/src/stun/addrs.c:

stun_getifaddrs() is used on all non-WIN32 targets. It extracts from the
kernel an array describing network interfaces (I think).  These are written
into its out-parameter nr_local_addr addrs[] and the number of entries is
written to int *count.

There is a path through the main loop in stun_getifaddrs() which can cause a
nr_local_addr record to be returned with its .interface.type field being
uninitialized, but which nevertheless is later used. It also looks as if the
.interface.estimated_speed field is not initialised.

This commit zero-initialises the entire output array before writing anything
into it, to avoid such problems, on all targets.

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

--HG--
extra : moz-landing-system : lando
2020-01-06 18:11:56 +00:00