Commit Graph

810 Commits

Author SHA1 Message Date
Nicholas Nethercote
9252435548 Bug 1410794 (attempt 2) - Change some |string| occurrences in nsIPrefBranch.idl to |ACString|. r=erahm.
This makes the code nicer. In particular, it removes many getter_Copies()
calls. The patch also converts a lot of nsCStrings to nsAutoCString, which will
avoid heap allocation in the common case.

The patch also renames PREF_CopyCharPref() as PREF_GetCStringPref(), because
it's actually getting a string, not a char, and that matches the existing
GetCString() and GetDefaultCString() methods. Correspondingly, it also renames
PREF_SetCharPref() as PREF_SetCStringPref().

The |aPrefName| arguments in nsIPrefBranch.idl remain as |string| because they
almost always involve passing in C string literals, and passing "foo" is much
nicer than passing NS_LITERAL_CSTRING("foo").

It's worth noting that early versions of this patch used |AUTF8String| instead
of |ACString|. But it turns out that libpref stores prefs internally as Latin1.
And |ACString| is compatible with Latin1 but |AUTF8String| isn't, because
non-ASCII Latin1 strings are not valid UTF-8!

MozReview-Commit-ID: D3f7a1Vl1oE

--HG--
extra : rebase_source : e6e4b15d6d210cfd93686f96400281f02bd1d06b
2017-10-27 10:30:33 +11:00
Chris Manchester
c86173526a Bug 1403346 - Replace all uses of ALLOW_COMPILER_WARNINGS with a template, remove ALLOW_COMPILER_WARNINGS. r=glandium
MozReview-Commit-ID: 1G2o4fy74cf
2017-10-25 15:12:09 -07:00
Nils Ohlmeier [:drno]
75da806f11 Bug 1408218: ignore EUI 64 and Teredo addresses if not needed. r=bwc
MozReview-Commit-ID: 5QHi9iC2e7y

--HG--
extra : rebase_source : 0f4f4afa3edd4153418661d8ef6f3efa12bf6223
2017-10-13 08:32:16 -07:00
Michael Froman
90e4564993 Bug 1405940 - Fix Null Pointer dereference in sigslot::lock_block r=bwc
Caused by several issues:
1) We were allowing an answer with modified ufrag/pass to
   begin an ICE restart even if the offer didn't indicate
   it was restarting.
2) This should no longer happen, but in cases where restart logic
   was started inappropriately, TransportLayerIce::SetParameters
   could get a null stream, and we check for that now.

MozReview-Commit-ID: JFQ1zz3l5wY

--HG--
extra : rebase_source : a6d43aabada86669850ddce07ea86da8118a6bec
2017-10-12 22:38:01 -05:00
Byron Campen [:bwc]
4fda13fafa Bug 1406154: Ensure that we avoid truncating the interface description strings in a couple of corner cases. r+drno
MozReview-Commit-ID: KMTpbkvA4N

--HG--
extra : rebase_source : 377b9ae8c2664d186a496ef04a6e42b00d56883f
2017-10-12 12:12:40 -05:00
Kris Maglione
9184710ae5 Bug 1404198: Part 2g - Switch to NS_NewTimer* in media. r=njn
MozReview-Commit-ID: 3ydSj5HfYzZ

--HG--
extra : rebase_source : 6d38da71d3c82b900b46e69c12ceb81202dd965d
2017-10-15 23:14:33 -07:00
Byron Campen [:bwc]
f651e3ada4 Bug 1404535: Add telemetry that times nr_ice_gather. r+drno r=chutten,drno,liuche
MozReview-Commit-ID: I4nH8sZNX5g

--HG--
extra : rebase_source : 9a7cc3673f68fefb9ed19a58ab896b0d60648b17
2017-09-29 17:49:32 -05:00
Michael Froman
6e07c1bbf9 Bug 1361894 - ignore STUN/TURN servers with mis-matched link local addr. r=bwc
MozReview-Commit-ID: FMRWMHCROUf

--HG--
extra : rebase_source : 98d3100010c50a21bd48c474aac140e8e1636271
2017-09-29 09:20:07 -05:00
Dan Minor
55f5ef6e16 Bug 1373843 - Add -fsanitize-coverage to cflags in nicer.gyp; r=posidron
I missed doing this in the original patch because my mozconfig defined the
CFLAGS globally to include -fsanitize-coverage.

MozReview-Commit-ID: 4QdiIgdfAm2

--HG--
extra : rebase_source : bfd1ef5097b91c23913c0349a04154f18f60eef5
2017-09-20 17:05:07 -04:00
Dan Minor
6e7bc1c221 Bug 1373843: Change assertion about message length to error in stun_codec.c; r=drno
MozReview-Commit-ID: 1oUEQk9vg1L

--HG--
extra : rebase_source : 8ca178eb1e356b06b09582e85a0e91a93648b29c
2017-09-19 15:29:22 -04:00
Nils Ohlmeier [:drno]
a8d005b348 Bug 1373843: Add a libfuzzer test for the stun parser; r=decoder
MozReview-Commit-ID: BWUnBIMhT5C

--HG--
extra : rebase_source : 8d8c6de040601621f5f64c8a7cf5a99486ae9879
2017-06-16 16:01:19 -07:00
Henri Sivonen
1961f9269f Bug 860727 clean-up - Remove mbslen.c/h from the tree. r=bwc
MozReview-Commit-ID: 2sRjpNYX5eA

--HG--
extra : rebase_source : 23b0bf6a5ce470daa7ec5ee951d0cccf43402426
2017-09-06 10:24:54 +03:00
Henri Sivonen
2aa5a465d3 Bug 860727 - Implement UTF-8 code unit counting without setlocale(). r=bwc
Counting the code points in a UTF-8 string is simple enough that that it is
not worthwhile to use the locale-dependent parts of the C standard library
for the task.

MozReview-Commit-ID: 6Tzd5NHub3B

--HG--
extra : rebase_source : d452896317d354ee85c817533cba3116adf5277e
2017-09-05 09:12:02 +03:00
Michael Froman
5d1597b31f Bug 1391857 - fixing ctx flags for e10s stun addr gathering. r=drno
In the case of e10s, the ctx flags for default route only (and less
importantly in this case, proxy only) were not set on the ice ctx
when SetStunAddrs was called in PeerConnectionMedia.

MozReview-Commit-ID: CldUpJfaaH3

--HG--
extra : rebase_source : 6223722275d4741519890d4d2b8436b05ca43155
2017-08-22 10:13:06 -05:00
Eric Rahm
50513900c7 Bug 1389598 - Part 2: Remove gonk references from media/ r=jesup
--HG--
extra : rebase_source : d1af2d0987038e1c0b0b0c971d0d2e4e9f08364a
2017-08-11 17:46:15 -07:00
Karl Tomlinson
64c0c31a2d bug 1390286 receive WrapRunnable*() parameters by reference r=jesup
This permits using these functions with non-param types such as AutoTArray.

MozReview-Commit-ID: 3J1bLjgwB9M

--HG--
extra : rebase_source : 897e64b6f1c8d1c8c939a18d2b0813b33bcd8083
2017-08-14 11:33:53 +12:00
Sylvestre Ledru
d938e24c4c Bug 1387002 - Replace .size() by .empty() when applicable in webrtc & mtransport r=jesup
MozReview-Commit-ID: 4DyftBRDEcU

--HG--
extra : rebase_source : 92b00b313060c0631e087216c6a30b421b58199d
2017-08-04 09:36:19 +02:00
Mike Hommey
66d4d80b03 Bug 1388681 - Disable -Wformat-security where -Wformat is disabled. r=bwc
--HG--
extra : rebase_source : b303f70c2900b8dff538083a6b406545170356c2
2017-08-09 18:45:16 +09:00
Bevis Tseng
95b18d794e Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm
--HG--
extra : rebase_source : 84de1abfcc30a6964144c2e6718a508c71027b65
2017-07-27 02:18:20 +08:00
Sylvestre Ledru
7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Sylvestre Ledru
4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Bill McCloskey
224d56eb18 Bug 1377222 - Eliminate nsITimer::InitWithFuncCallback in favor of InitWithNamedFuncCallback (r=froydnj)
MozReview-Commit-ID: 9zN9aAd7daA
2017-07-03 16:19:56 -07:00
Jan Keromnes
5257fdad8c Bug 1372977 - Use nullptr in /media and /dom/media (clang-tidy: modernize-use-nullptr). r=bwc 2017-06-28 15:38:00 -04:00
Dan Minor
a9df96e992 Bug 1355947 - Use TestNrSocket to build a fake ICE implementation for testing; r=drno
MozReview-Commit-ID: GhSX9t8DmTO

--HG--
extra : rebase_source : 8fea1934f88b378606b4af96d96c27560906fd88
extra : histedit_source : 4d6fc904c79c74ba8c24e816d70368ee3a850769
2017-04-18 06:54:34 -04:00
Dan Minor
1cc1e5734f Bug 1355947 - Add NatDelegate to TestNat; r=bwc
This allows tests to implement different packet handling schemes without having
to extend or modify TestNat itself.

MozReview-Commit-ID: 6DlESF3hfX6

--HG--
extra : rebase_source : ebb621f6f6ba00811cda7baef449caec126cb15e
2017-06-13 10:08:45 -04:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Nicholas Nethercote
f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Chris Peterson
7dd51821f3 Bug 1373525 - media/mtransport: Remove unused member functions and unused member variable trickled_. r=drno
media/mtransport/test/ice_unittest.cpp:353:12 [-Wunused-member-function] unused member function 'Stream'
media/mtransport/test/ice_unittest.cpp:1394:7 [-Wunused-member-function] unused member function 'trickled'
media/mtransport/test/ice_unittest.cpp:1867:8 [-Wunused-member-function] unused member function 'SetExpectedTypes'
media/mtransport/test/transport_unittests.cpp:917:8 [-Wunused-member-function] unused member function 'InitIce'

MozReview-Commit-ID: 70PNtdc92mg

--HG--
extra : source : 5dc220c3efd5bd2f8f844eb85887a4bcfabb3990
extra : intermediate-source : 0751fb1b9b19a8451c5aba7e021bcb386962ce5d
2017-06-11 00:09:42 -07:00
Carsten "Tomcat" Book
8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey
6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book
ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey
4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Nils Ohlmeier [:drno]
f6cddda6c5 Bug 1373103: log TCP read callback log message only if more then 5 callback are pending. r=mjf
MozReview-Commit-ID: E0oAG89XGwg

--HG--
extra : rebase_source : 21d14ddd28d819a498fce03d1b484e5a82e22a0d
2017-06-14 18:35:59 -07:00
Michael Froman
da7254ecbf Bug 1339906 - pt 5 - add writable field to webidl for RTCIceCandidatePairStats and implement readable and writeable fields. r=drno,qdot
MozReview-Commit-ID: 6IODhX5mtnP

--HG--
extra : rebase_source : 30245be09b3b4bf057672cceb2d90d3393da035c
2017-06-06 17:33:02 -05:00
Michael Froman
1b76f106fd Bug 1339906 - pt 4 - add last sent and received timestamps to RTCIceCandidatePairStats. r=drno,qdot
MozReview-Commit-ID: GE23lS7qs9n

--HG--
extra : rebase_source : 5b39e4232258eca1807d3c962a2ed40c2724822b
2017-06-06 17:36:40 -05:00
Michael Froman
69f85fff44 Bug 1339906 - pt 1 - Add bytesSent and bytesReceived to RTCIceCandidatePairStats. r=drno,qdot
MozReview-Commit-ID: BQGPTUzRCB3

--HG--
extra : rebase_source : cd2abb970a07479c8425a13d12fc0fbaa487b00e
2017-06-06 16:30:56 -05:00
Michael Froman
55d8a7bd34 Bug 1368159 - change log statement for pre-existing local addresses from error to warning in nr_ice_set_local_addresses. r=drno
When I added this check during the modifications for Bug 1345511 (Move
nICEr stun local address discovery to an IPC call to enable future
sandbox restrictions on content process) I originally thought this was
more of an error condition, but it really isn't.  It can happen each
time the following method(s) is called:
  PeerConnectionMedia::EnsureTransports() ->
    GatherIfReady() ->
      EnsureIceGathering_s()

MozReview-Commit-ID: Ct3teqXBxWd

--HG--
extra : rebase_source : a116a8423fd999c4746e9375b8f42a6d908a1ea7
2017-06-07 13:38:46 -05:00
Kershaw Chang
104a4b2e9c Bug 1343743 - Part6: Pass a labeled event target to StunAddrsRequestChild's constructor., r=bwc
Pass an event target argument in constructor, so we can call gNeckoChild->SetEventTargetForActor before sending constructor message to parent.
2017-06-12 00:25:00 +02:00
Kershaw Chang
d17d3c6887 Bug 1343743 - Part4: Pass a labeled main thread event target in nsIUDPSocketChild::bind, r=jdm
Add an event target parameter in nsIUDPSocketChild::bind, so we can use this labeled event target to dispatch runnables in UDPSocketChild.
2017-06-12 00:24:00 +02:00
Kershaw Chang
a2f2bae579 Bug 1343743 - Part3-1: Use system group's event target for TCPSocketChild's constructor, r=bwc
Pass an event target argument in constructor, so we can call gNeckoChild->SetEventTargetForActor before sending constructor message to parent.
2017-06-12 00:23:00 +02:00
Dan Minor
f17b41d15d Bug 1354353 - nICEr and nrappkit should not build with NVALGRIND under MOZ_VALGRIND builds; r=drno
This applies the fix used in Bug 1354207 for webrtc to nICEr and nrappkit.

--HG--
extra : rebase_source : d3f1370c9100ca66272611348c1b3462e65cdfaf
2017-05-30 12:37:29 -04:00
Nils Ohlmeier [:drno]
274b2c935b Bug 1358889: check if mThread is around before dereferencing. r=jesup
MozReview-Commit-ID: 88ZonLVGZK9

--HG--
extra : rebase_source : 8d3ee2e0a9e77b73ece6d2351758ad8256b2ade0
2017-04-24 16:15:10 -07:00
Nils Ohlmeier [:drno]
f588ac7e28 Bug 1303867: destroy SSL FD to send out DTLS allert on close. r=mt
MozReview-Commit-ID: EaMkehmTcs3

--HG--
extra : rebase_source : 18acf0fe7bc3b6ccffc0c5667a962161411b56d5
2017-04-20 19:52:24 -07:00
Nils Ohlmeier [:drno]
948bfcc4f7 Bug 969715: remove INET and INET6 from sctp build env. r=jesup
MozReview-Commit-ID: 4e67tOzltoc

--HG--
extra : rebase_source : c0c134bde1b0400b3fc37aaada0187948442e9cb
2016-12-08 23:49:43 -10:00
Mike Hommey
34e619d1c1 Bug 1357323 - Remove support for gonk in the build system. r=gps
Everything depending on the widget being gonk can go away, as well as
everything depending on MOZ_AUDIO_CHANNEL_MANAGER, which was only
defined on gonk builds under b2g/ (which goes away in bug 1357326).

--HG--
extra : rebase_source : 9f0aeeb7eea8417fa4e06d662d566d67ecaf2a24
2017-04-18 16:56:09 +09:00
Nils Ohlmeier [:drno]
45a1983cc1 Bug 1354222: fix log level casting warnings. r=erahm
MozReview-Commit-ID: A6hnPD3NkYr

--HG--
extra : rebase_source : a59a3d5acfdc219dd3f21b6acf1179125c766f5b
2017-04-06 11:00:35 -07:00
Michael Froman
1a2153bf46 Bug 1353575 - Switch to google stun server instead of twilio for ice_unittest.cpp. r=bwc,drno
MozReview-Commit-ID: HrS3oKjg17Z

--HG--
extra : rebase_source : a4a40bb9a5694054d736cabc7ff22b57037f6487
2017-04-04 13:47:54 -05:00
Eric Rahm
83eba01284 Bug 1353143 - Part 1: Explicitly include prlog.h in mtransport/logging.h. r=drno
This updates mtransport logging to explicitly include prlog.h and defines
MOZ_MTLOG in terms of PR_LOG rather than MOZ_LOG when building outside of XUL.
2017-04-04 14:36:14 -07:00
Michael Froman
5ffad762cd Bug 1350568 - don't dispatch IPC call to StunAddrsRequestChild after content process IPC channel goes away. r=jesup
MozReview-Commit-ID: IoAWO9Frf1u

--HG--
extra : rebase_source : fc3a5d8d066dadb476ea965014553c99515b1547
2017-03-26 13:30:28 -05:00
Nils Ohlmeier [:drno]
3fe5112bbb Bug 1345791: ICE disconnect state is not a crash. r=bwc
MozReview-Commit-ID: IwrWVvjkNmX

--HG--
extra : rebase_source : e9c4b92acddb82298b439152e622132a49bd6daa
2017-03-29 16:39:42 -05:00