Commit Graph

5078 Commits

Author SHA1 Message Date
Sebastian Hengst
d7527a414d Backed out changeset 07b534f44740 (bug 1384835) for failing xpcshell's security/manager/ssl/tests/unit/test_cert_sha1.js checkCertErrorGenericAtTime on Linux x64 debug. r=backout 2017-07-28 10:30:29 +02:00
Sebastian Hengst
1d708511f0 Backed out changeset 5df4d8778602 (bug 1384835) 2017-07-28 10:29:29 +02:00
Nicholas Nethercote
0574a6b496 Bug 1384835 (part 2) - Remove the Preferences::Get*String() variants that return nsAdoptingString. r=froydnj.
Because we want to remove nsAdoptingString. We have other variants that don't
use nsAdoptingString, which can be used instead. There are three basic
patterns.

1. The easiest case is when we don't check for success.

> nsAdoptingString s = Preferences::GetString("foo");
> foo(s);

becomes:

> nsAutoString s;
> Preferences::GetString("foo", s);
> foo(s);

2. The next case is when we check if the result is empty.

> nsAdoptingString s = Preferences::GetString("foo");
> if (s.IsEmpty()) { ... }

becomes:

> nsAutoString s;
> Preferences::GetString("foo", s);
> if (s.IsEmpty()) { ... }

3. The final case is when we null check the result.

> nsAdoptingString s = Preferences::GetString("foo");
> if (s) { ... }

becomes:

> nsAutoString s;
> nsresult rv = Preferences::GetString("foo", s);
> if (NS_SUCCEEDED(rv)) { ... }

The patch also avoids some UTF8/UTF16 conversions in a few places.

--HG--
extra : rebase_source : f339b1a3dda4dc93979d38c30c001fbe77485b55
2017-07-25 20:36:14 +10:00
Nicholas Nethercote
f314cbcbe5 Bug 1384835 (part 1) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
This is basically a cosmetic change; references are the normal way to do string
outparams.

--HG--
extra : rebase_source : ffc5945f269bdcd3d4116755b56713e87a44b6cd
2017-07-25 19:12:56 +10:00
Julian Seward
408d24da56 Bug 1382563 - Remove ns*String::AssignWithConversion. r=erahm.
This patch replaces four functions of the name AssignWithConversion which
are essentially wrappers around CopyASCIItoUTF16 and LossyCopyUTF16toASCII
with direct calls to the latter two functions.  The replaced functions are:

  void nsCString::AssignWithConversion( const nsAString& aData )
  void nsString::AssignWithConversion( const nsACString& aData )

  void nsTString_CharT::AssignWithConversion(
                            const incompatible_char_type* aData,
                            int32_t aLength = -1);

The last of the three exists inside the double-included nsTString* world and
so describes two functions, giving four in total.

This has two advantages:

* it removes code

* at the call points, it makes clear (from the replacement name) which
  conversion is being carried out.  The generic name "AssignWithConversion"
  doesn't make that obvious -- one had to infer it from the types.

The patch also removes two commented out lines from
editor/composer/nsComposerCommands.cpp, that appear to be related.  They are
at top level, where they would never have compiled.  They look like
leftovers from some previous change.

--HG--
extra : rebase_source : fb47bf450771c3c9ee3341dd14520f5da69ec4f5
2017-07-24 19:23:52 +02:00
David Keeler
e3018d572d bug 1382866 - prompt for authentication when changing certificate trust fails r=Cykesiopka,jcj
MozReview-Commit-ID: 3ryUyAfbNCs

--HG--
rename : security/manager/ssl/tests/unit/test_certDB_import.js => security/manager/ssl/tests/unit/test_certDB_import_with_master_password.js
extra : rebase_source : ad39258078c1084166f0c59250352cd899b10507
2017-07-21 16:58:42 -07:00
Kartikaya Gupta
ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Wes Kocher
fd09155f06 Merge m-c to inbound, a=merge
MozReview-Commit-ID: 418vKEKrk3n
2017-07-24 18:10:56 -07:00
ffxbld
ef646e1a27 No bug, Automated HPKP preload list update from host bld-linux64-spot-307 - a=hpkp-update 2017-07-24 09:28:36 -07:00
ffxbld
fedef7afe3 No bug, Automated HSTS preload list update from host bld-linux64-spot-307 - a=hsts-update 2017-07-24 09:28:32 -07:00
ffxbld
8040d0c385 No bug, Automated HPKP preload list update from host bld-linux64-spot-302 - a=hpkp-update 2017-07-23 09:19:42 -07:00
ffxbld
2374a8dca9 No bug, Automated HSTS preload list update from host bld-linux64-spot-302 - a=hsts-update 2017-07-23 09:19:39 -07:00
ffxbld
39bc5ffdf3 No bug, Automated HPKP preload list update from host bld-linux64-spot-388 - a=hpkp-update 2017-07-22 09:24:29 -07:00
ffxbld
f2b288f21a No bug, Automated HSTS preload list update from host bld-linux64-spot-388 - a=hsts-update 2017-07-22 09:24:26 -07:00
Wes Kocher
d45eb771f0 Merge m-c to inbound, a=merge
MozReview-Commit-ID: Ah48RzFU8Mt
2017-07-21 18:20:46 -07:00
ffxbld
fe79f566df No bug, Automated HPKP preload list update from host bld-linux64-spot-309 - a=hpkp-update 2017-07-21 09:18:15 -07:00
ffxbld
9681568945 No bug, Automated HSTS preload list update from host bld-linux64-spot-309 - a=hsts-update 2017-07-21 09:18:11 -07:00
Sebastian Hengst
367f0ac5a2 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IWRTFZdtzaE
2017-07-21 12:56:44 +02:00
ffxbld
6aae95fab2 No bug, Automated HPKP preload list update from host bld-linux64-spot-303 - a=hpkp-update 2017-07-20 09:22:20 -07:00
ffxbld
eaa9f8ab1b No bug, Automated HSTS preload list update from host bld-linux64-spot-303 - a=hsts-update 2017-07-20 09:22:17 -07:00
Tristan Bourvon
64e1ded43a Bug 1382994 - Fix UAF in InitializeNSSWithFallbacks. r=keeler
MozReview-Commit-ID: 6OYl5wlPy5W

--HG--
extra : rebase_source : fce3e52edc55c970feca67a82c71fa2bb2b5d9b7
2017-07-21 12:14:38 +02: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
ffxbld
3a3af33f51 No bug, Automated HPKP preload list update from host bld-linux64-spot-302 - a=hpkp-update 2017-07-19 09:22:45 -07:00
ffxbld
5005f0245a No bug, Automated HSTS preload list update from host bld-linux64-spot-302 - a=hsts-update 2017-07-19 09:22:42 -07:00
Nicholas Nethercote
ff8375cf2e Bug 1382099 - Remove MOZ_WIDGET_GONK from security/. r=jld.
--HG--
extra : rebase_source : 8027baf7a24e5e0d91a175ab38614594c143767b
2017-07-21 10:45:42 +10:00
ffxbld
a83a4b6897 No bug, Automated HPKP preload list update from host bld-linux64-spot-307 - a=hpkp-update 2017-07-18 09:16:36 -07:00
ffxbld
1a42bbc6f4 No bug, Automated HSTS preload list update from host bld-linux64-spot-307 - a=hsts-update 2017-07-18 09:16:33 -07:00
ffxbld
88180977d7 No bug, Automated HPKP preload list update from host bld-linux64-spot-303 - a=hpkp-update 2017-07-17 09:25:02 -07:00
ffxbld
b825b8fa10 No bug, Automated HSTS preload list update from host bld-linux64-spot-303 - a=hsts-update 2017-07-17 09:24:59 -07:00
ffxbld
01d27fdd39 No bug, Automated HPKP preload list update from host bld-linux64-spot-388 - a=hpkp-update 2017-07-16 09:18:06 -07:00
ffxbld
665614ab12 No bug, Automated HSTS preload list update from host bld-linux64-spot-388 - a=hsts-update 2017-07-16 09:18:03 -07:00
ffxbld
80e4a08fd4 No bug, Automated HPKP preload list update from host bld-linux64-spot-301 - a=hpkp-update 2017-07-15 09:28:04 -07:00
ffxbld
b1e5771d96 No bug, Automated HSTS preload list update from host bld-linux64-spot-301 - a=hsts-update 2017-07-15 09:28:01 -07:00
Wes Kocher
ee45f814bb Merge m-c to autoland, a=merge
MozReview-Commit-ID: GOb2bgdUd36
2017-07-14 17:27:36 -07:00
Ryan VanderMeulen
418fe0e50f Merge m-c to inbound. a=merge 2017-07-14 12:46:40 -04:00
ffxbld
63892fd487 No bug, Automated HPKP preload list update from host bld-linux64-spot-308 - a=hpkp-update 2017-07-14 09:41:09 -07:00
ffxbld
a7fbfe86b2 No bug, Automated HSTS preload list update from host bld-linux64-spot-308 - a=hsts-update 2017-07-14 09:41:06 -07:00
Andrea Marchesini
50f9ea47a3 Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
David Keeler
bfdf3c3c7c bug 1375709 - avoid deadlock when shutting down NSS r=Cykesiopka,ttaubert
The deadlock fix attempted in bug 1273475 was incomplete. This should prevent
the issue by preventing nsNSSShutDownPreventionLocks from attempting to
increment the NSS activity state count when shutdown is in progress (this is
acceptible because when code that creates any nsNSSShutDownPreventionLocks then
checks isAlreadyShutDown(), it will return true because sInShutdown is true,
thus preventing that code from unsafely using NSS resources and functions).

MozReview-Commit-ID: 4o5DGbU2TCq

--HG--
extra : rebase_source : 4a611a3ad615277f9b2191919109108dd1dfde46
2017-07-10 16:25:51 -07:00
Nicholas Nethercote
c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Kai Engert
10b5520799 Bug 1380706, PSM should depend on mozStorage, as a workaround for a sqlite3_config race, r=keeler 2017-07-14 15:31:30 +02:00
ffxbld
cef8389c68 No bug, Automated HPKP preload list update from host bld-linux64-spot-301 - a=hpkp-update 2017-07-12 09:06:29 -07:00
ffxbld
01f529a11b No bug, Automated HSTS preload list update from host bld-linux64-spot-301 - a=hsts-update 2017-07-12 09:06:26 -07:00
ffxbld
d37d297687 No bug, Automated HPKP preload list update from host bld-linux64-spot-306 - a=hpkp-update 2017-07-11 09:00:05 -07:00
ffxbld
d3d35b9d2b No bug, Automated HSTS preload list update from host bld-linux64-spot-306 - a=hsts-update 2017-07-11 09:00:02 -07:00
ffxbld
5dadcbe55b No bug, Automated HPKP preload list update from host bld-linux64-spot-307 - a=hpkp-update 2017-07-10 09:13:32 -07:00
ffxbld
cff6343801 No bug, Automated HSTS preload list update from host bld-linux64-spot-307 - a=hsts-update 2017-07-10 09:13:29 -07:00
ffxbld
b7e531410e No bug, Automated HPKP preload list update from host bld-linux64-spot-308 - a=hpkp-update 2017-07-09 09:02:40 -07:00
ffxbld
74998d2dd7 No bug, Automated HSTS preload list update from host bld-linux64-spot-308 - a=hsts-update 2017-07-09 09:02:37 -07:00
ffxbld
4aaa085139 No bug, Automated HPKP preload list update from host bld-linux64-spot-389 - a=hpkp-update 2017-07-08 09:13:56 -07:00