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

15 Коммитов

Автор SHA1 Сообщение Дата
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
Jan de Mooij 4f7b2378dc Bug 1474273 - Add xpc::CurrentNativeGlobal and use it instead of NativeGlobal(JS::CurrentGlobalOrNull(cx)). r=bz 2018-07-11 14:07:02 +02:00
David Keeler 23798b7e5f bug 1465976 - remove all find*ByName APIs from PSM PKCS#11 module/slot/token interfaces r=fkiefer,jcj
Before this patch, we exposed a few interfaces that revolved around mapping a
name to a specific PKCS#11 module, slot, or token. These APIs were all either
problematic and/or unnecessary. In theory there could be two tokens in different
modules with the same name, so nsIPK11TokenDB.findTokenByName wasn't guaranteed
to return what the consumer expected it to. In general, these APIs were used by
front-end code to go from a handle on the specific object in question to a
string identifier and then back to a handle on the object. This was unnecessary
- we can just retain the original handle.

MozReview-Commit-ID: IbqLbV4wceA

--HG--
extra : rebase_source : 05d39afd6bed0aa5e7694e1c79baf836edc03214
2018-05-31 14:46:06 -07:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Nika Layzell 2d188849ae Bug 1455217 - Part 3: Use the new xpidl Promise type instead of nsISupports, r=bz 2018-05-14 17:55:54 -04:00
Doug Thayer 7874b62da6 Bug 1444290 - Forget bg SDR runnable reference when dispatching r=froydnj
We're seeing a crash in tests from trying to release the promise in
this runnable from the background thread we create to run this
method. The only way I can see that happening is that the bg thread
loses the race with the main thread to drop its reference to the
runnable, causing it to call the destructor. Rather than calling the
helper that adds a reference to the runnable and then forgets it,
let's just forget it here.

MozReview-Commit-ID: LXpC8Kr2SBb

--HG--
extra : rebase_source : bfed3ed4128c6a3ede6f06feed1f50cb9f30e485
2018-03-22 09:31:40 -07:00
David Keeler ad5cec4768 bug 1421084 - part 3/4 - remove nsNSSShutDownObject::shutdown and virtualDestroyNSSReference r=mt,ttaubert
MozReview-Commit-ID: ErL7ZjAGVVC

--HG--
extra : rebase_source : 2869aafaef729f0ad190f957919e8b9c40700477
2018-01-24 14:29:08 -08:00
David Keeler a0e34baf27 bug 1421084 - part 2/4 - remove nsNSSShutDownObject::isAlreadyShutDown() r=mt,ttaubert
MozReview-Commit-ID: DlS16pHE0Ik

--HG--
extra : rebase_source : d7596a3571478adefae4ffa5d446ff5234ba9ed7
2018-01-23 12:22:56 -08:00
David Keeler e8cc0ba1ce bug 1421084 - part 1/4 - remove now-unnecessary nsNSSShutDownPreventionLock r=mt,ttaubert
As of bug 1417680, the NSS shutdown tracking infrastructure is unnecessary (and
does nothing anyway). This series of changesets removes the remaining pieces in
a way that is hopefully easy to confirm is correct.

MozReview-Commit-ID: 8Y5wpsyNlGc

--HG--
extra : rebase_source : ef6b481510d949e404a4ef5615097d66e566c947
2018-01-23 10:37:47 -08:00
Doug Thayer ac49bf6b85 Bug 1426721 - Add async/bulk encryption interface to SDR r=keeler,MattN
Since encryption can be somewhat CPU intensive, if we're encrypting
a large number of strings we want to be able to do so in a background
thread. This will be consumed by the profile migrators when importing
logins.

MozReview-Commit-ID: JoJGOgMzZ4u

--HG--
extra : rebase_source : 4677482b4e9b1df7c7ca70a0e817204ef6638cdf
2018-01-23 10:06:31 -08:00
Cykesiopka 895edf7133 Bug 1338895 - Avoid non-smart string IDL types in remaining PSM IDL files. r=aklotz,keeler
Smart string classes like nsCString are safer to use than raw |char*| strings,
and are typically easier to deal with as well.

MozReview-Commit-ID: 18C293zWrJw

--HG--
extra : rebase_source : 350191d4c3047fb38d18e8c6d9370cd059007861
2017-02-26 20:36:40 +08:00
Cykesiopka a16f7b0f6a Bug 1296316 - Convert nsNSSShutDownObject::CalledFromType to an enum class. r=mgoodwin
enum classes are in general safer than plain enums, and as such should be
preferred.

MozReview-Commit-ID: 1FK89SNhdk4

--HG--
extra : rebase_source : 764c4855026c02d8c9e33ca33637fec54ea5ca31
2016-08-20 23:00:19 +08:00
Cykesiopka a2072b8e93 Bug 1275841 - Make nsISecretDecoderRing.idl encryptString() and decryptString() use the Mozilla string classes. r=keeler
The Mozilla string classes don't require manual memory management and
automatically keep track of length, making them a safer choice than raw C
strings.

MozReview-Commit-ID: EwCiiP9EhDr

--HG--
extra : transplant_source : %05%D4%B6s%C1%DBye%2C3%C3%85%DB%22%91h%B4%27%E1l
2016-08-19 09:37:48 +08:00
Cykesiopka a120c3d754 Bug 1275841 - Remove unnecessary methods and interfaces from nsISecretDecoderRing.idl. r=keeler
1. encrypt() and decrypt() are C++ only.
The only callers are in SecretDecoderRing.cpp, and binary add-ons aren't
supported anymore. So, there is no need for these methods to be defined in the
IDL, and they should be treated as private to the nsISecretDecoderRing
implementation.

2. nsISecretDecoderRingConfig has never been implemented.
The interface and implementation are currently just bloat. If there is a need
for specifying the window for prompts in the future, a better way can be devised
then.

MozReview-Commit-ID: 1wXCDTIBJA2

--HG--
extra : transplant_source : %D7%27%5E3%BF%E9%16%0E%A3%8B%E1%8E%ADj%3F%25%B3i%9Al
2016-08-19 09:37:43 +08:00
Cykesiopka 986f32c262 Bug 1275841 - Rename nsSDR.(cpp|h) to SecretDecoderRing.(cpp|h). r=keeler
There are currently two ways of naming files containing the implementation of
interface nsIFoo:
1. nsFoo.(cpp|h) (previous convention)
2. Foo.(cpp|h) (new convention)

nsSDR.(cpp|h) matches neither of these. Renaming the files to follow convention
makes it easier to discover what the files implement, and increases codebase
consistency.

MozReview-Commit-ID: 3ThPxPouiie

--HG--
rename : security/manager/ssl/nsSDR.cpp => security/manager/ssl/SecretDecoderRing.cpp
rename : security/manager/ssl/nsSDR.h => security/manager/ssl/SecretDecoderRing.h
extra : transplant_source : %7D%FC%AD%9C%E8%AD%CFz%FE%F2%D6%1E%A0%0A%06sk%3D%AD%AC
2016-08-19 09:36:53 +08:00