Bug 1523969 part 21 - Move method definition inline comments to new line in 'security/'. r=ehsan
authorRyan Hunt <rhunt@eqrion.net>
Mon, 25 Feb 2019 16:12:13 -0600
changeset 519784 4ab919dd438b317c9a83e8d6ff69ef020b78c9ce
parent 519783 977a0ba7ec7051844703272ddcc5910d112dfc63
child 519785 4ec53f720e55582f3450066dcb4f7ff1ec5d6a65
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1523969
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1523969 part 21 - Move method definition inline comments to new line in 'security/'. r=ehsan Differential Revision: https://phabricator.services.mozilla.com/D21122
security/manager/ssl/SSLServerCertVerification.cpp
security/manager/ssl/SharedSSLState.cpp
security/manager/ssl/TransportSecurityInfo.cpp
security/manager/ssl/nsNSSCertificate.cpp
security/manager/ssl/nsNSSComponent.cpp
security/sandbox/chromium-shim/sandbox/win/permissionsService.cpp
security/sandbox/linux/broker/SandboxBrokerCommon.cpp
security/sandbox/linux/glue/SandboxPrefBridge.cpp
security/sandbox/linux/reporter/SandboxReporter.cpp
security/sandbox/win/src/sandboxtarget/sandboxTarget.cpp
--- a/security/manager/ssl/SSLServerCertVerification.cpp
+++ b/security/manager/ssl/SSLServerCertVerification.cpp
@@ -1371,17 +1371,18 @@ SECStatus AuthCertificate(CertVerifier& 
     // infoObject so it can be used for error reporting.
     infoObject->SetFailedCertChain(std::move(peerCertChain));
     PR_SetError(MapResultToPRErrorCode(rv), 0);
   }
 
   return rv == Success ? SECSuccess : SECFailure;
 }
 
-/*static*/ SECStatus SSLServerCertVerificationJob::Dispatch(
+/*static*/
+SECStatus SSLServerCertVerificationJob::Dispatch(
     const RefPtr<SharedCertVerifier>& certVerifier, const void* fdForLogging,
     nsNSSSocketInfo* infoObject, const UniqueCERTCertificate& serverCert,
     const UniqueCERTCertList& peerCertChain, const SECItem* stapledOCSPResponse,
     const SECItem* sctsFromTLSExtension, uint32_t providerFlags, Time time,
     PRTime prtime) {
   // Runs on the socket transport thread
   if (!certVerifier || !infoObject || !serverCert) {
     NS_ERROR("Invalid parameters for SSL server cert validation");
--- a/security/manager/ssl/SharedSSLState.cpp
+++ b/security/manager/ssl/SharedSSLState.cpp
@@ -153,40 +153,43 @@ void SharedSSLState::NoteSocketCreated()
   mSocketCreated = true;
 }
 
 bool SharedSSLState::SocketCreated() {
   MutexAutoLock lock(mMutex);
   return mSocketCreated;
 }
 
-/*static*/ void SharedSSLState::GlobalInit() {
+/*static*/
+void SharedSSLState::GlobalInit() {
   MOZ_ASSERT(NS_IsMainThread(), "Not on main thread");
   gPublicState = new SharedSSLState();
   gPrivateState = new SharedSSLState();
   gPrivateState->NotePrivateBrowsingStatus();
 }
 
-/*static*/ void SharedSSLState::GlobalCleanup() {
+/*static*/
+void SharedSSLState::GlobalCleanup() {
   MOZ_ASSERT(NS_IsMainThread(), "Not on main thread");
 
   if (gPrivateState) {
     gPrivateState->Cleanup();
     delete gPrivateState;
     gPrivateState = nullptr;
   }
 
   if (gPublicState) {
     gPublicState->Cleanup();
     delete gPublicState;
     gPublicState = nullptr;
   }
 }
 
-/*static*/ void SharedSSLState::NoteCertOverrideServiceInstantiated() {
+/*static*/
+void SharedSSLState::NoteCertOverrideServiceInstantiated() {
   sCertOverrideSvcExists = true;
 }
 
 void SharedSSLState::Cleanup() { mIOLayerHelpers.Cleanup(); }
 
 SharedSSLState* PublicSSLState() { return gPublicState; }
 
 SharedSSLState* PrivateSSLState() { return gPrivateState; }
--- a/security/manager/ssl/TransportSecurityInfo.cpp
+++ b/security/manager/ssl/TransportSecurityInfo.cpp
@@ -583,18 +583,18 @@ static NS_DEFINE_CID(kNSSSocketInfoCID, 
 NS_IMETHODIMP
 TransportSecurityInfo::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) {
   *aClassIDNoAlloc = kNSSSocketInfoCID;
   return NS_OK;
 }
 
 // RememberCertErrorsTable
 
-/*static*/ RememberCertErrorsTable* RememberCertErrorsTable::sInstance =
-    nullptr;
+/*static*/
+RememberCertErrorsTable* RememberCertErrorsTable::sInstance = nullptr;
 
 RememberCertErrorsTable::RememberCertErrorsTable()
     : mErrorHosts(), mMutex("RememberCertErrorsTable::mMutex") {}
 
 static nsresult GetHostPortKey(TransportSecurityInfo* infoObject,
                                /*out*/ nsCString& result) {
   MOZ_ASSERT(infoObject);
   NS_ENSURE_ARG(infoObject);
--- a/security/manager/ssl/nsNSSCertificate.cpp
+++ b/security/manager/ssl/nsNSSCertificate.cpp
@@ -75,17 +75,18 @@ class nsNSSCertListEnumerator : public n
 // This is being stored in an uint32_t that can otherwise
 // only take values from nsIX509Cert's list of cert types.
 // As nsIX509Cert is frozen, we choose a value not contained
 // in the list to mean not yet initialized.
 #define CERT_TYPE_NOT_YET_INITIALIZED (1 << 30)
 
 NS_IMPL_ISUPPORTS(nsNSSCertificate, nsIX509Cert, nsISerializable, nsIClassInfo)
 
-/*static*/ nsNSSCertificate* nsNSSCertificate::Create(CERTCertificate* cert) {
+/*static*/
+nsNSSCertificate* nsNSSCertificate::Create(CERTCertificate* cert) {
   if (cert)
     return new nsNSSCertificate(cert);
   else
     return new nsNSSCertificate();
 }
 
 nsNSSCertificate* nsNSSCertificate::ConstructFromDER(char* certDER,
                                                      int derLen) {
--- a/security/manager/ssl/nsNSSComponent.cpp
+++ b/security/manager/ssl/nsNSSComponent.cpp
@@ -984,20 +984,21 @@ static const CipherPref sCipherPrefs[] =
     // All the rest are disabled
 
     {nullptr, 0}  // end marker
 };
 
 // This function will convert from pref values like 1, 2, ...
 // to the internal values of SSL_LIBRARY_VERSION_TLS_1_0,
 // SSL_LIBRARY_VERSION_TLS_1_1, ...
-/*static*/ void nsNSSComponent::FillTLSVersionRange(SSLVersionRange& rangeOut,
-                                                    uint32_t minFromPrefs,
-                                                    uint32_t maxFromPrefs,
-                                                    SSLVersionRange defaults) {
+/*static*/
+void nsNSSComponent::FillTLSVersionRange(SSLVersionRange& rangeOut,
+                                         uint32_t minFromPrefs,
+                                         uint32_t maxFromPrefs,
+                                         SSLVersionRange defaults) {
   rangeOut = defaults;
   // determine what versions are supported
   SSLVersionRange supported;
   if (SSL_VersionRangeGetSupported(ssl_variant_stream, &supported) !=
       SECSuccess) {
     return;
   }
 
@@ -1993,17 +1994,18 @@ nsNSSComponent::Observe(nsISupports* aSu
       clearSessionCache = false;
     }
     if (clearSessionCache) SSL_ClearSessionCache();
   }
 
   return NS_OK;
 }
 
-/*static*/ nsresult nsNSSComponent::GetNewPrompter(nsIPrompt** result) {
+/*static*/
+nsresult nsNSSComponent::GetNewPrompter(nsIPrompt** result) {
   NS_ENSURE_ARG_POINTER(result);
   *result = nullptr;
 
   if (!NS_IsMainThread()) {
     NS_ERROR("nsSDRContext::GetNewPrompter called off the main thread");
     return NS_ERROR_NOT_SAME_THREAD;
   }
 
--- a/security/sandbox/chromium-shim/sandbox/win/permissionsService.cpp
+++ b/security/sandbox/chromium-shim/sandbox/win/permissionsService.cpp
@@ -79,19 +79,18 @@ GetPlainFileName(const wchar_t* aNTFileN
 
   if (IsFlashTempFile(nameCopy, aFolder) && aFolder) {
     return *aFolder + FLASH_TEMP_FILENAME;
   }
 
   return nameCopy;
 }
 
-/* static */ PermissionsService*
-PermissionsService::GetInstance()
-{
+/* static */
+PermissionsService* PermissionsService::GetInstance() {
   static PermissionsService sPermissionsService;
   return &sPermissionsService;
 }
 
 PermissionsService::PermissionsService() :
   mFileAccessViolationFunc(nullptr)
 {
 }
--- a/security/sandbox/linux/broker/SandboxBrokerCommon.cpp
+++ b/security/sandbox/linux/broker/SandboxBrokerCommon.cpp
@@ -29,19 +29,19 @@
 #endif    // MSG_CMSG_CLOEXEC
 
 namespace mozilla {
 
 const char* SandboxBrokerCommon::OperationDescription[] = {
     "open",  "access", "stat",  "chmod",  "link",     "symlink",
     "mkdir", "rename", "rmdir", "unlink", "readlink", "connect"};
 
-/* static */ ssize_t SandboxBrokerCommon::RecvWithFd(int aFd, const iovec* aIO,
-                                                     size_t aNumIO,
-                                                     int* aPassedFdPtr) {
+/* static */
+ssize_t SandboxBrokerCommon::RecvWithFd(int aFd, const iovec* aIO,
+                                        size_t aNumIO, int* aPassedFdPtr) {
   struct msghdr msg = {};
   msg.msg_iov = const_cast<iovec*>(aIO);
   msg.msg_iovlen = aNumIO;
 
   char cmsg_buf[CMSG_SPACE(sizeof(int))];
   if (aPassedFdPtr) {
     msg.msg_control = cmsg_buf;
     msg.msg_controllen = sizeof(cmsg_buf);
@@ -88,19 +88,19 @@ const char* SandboxBrokerCommon::Operati
     }
     errno = EMSGSIZE;
     return -1;
   }
 
   return rv;
 }
 
-/* static */ ssize_t SandboxBrokerCommon::SendWithFd(int aFd, const iovec* aIO,
-                                                     size_t aNumIO,
-                                                     int aPassedFd) {
+/* static */
+ssize_t SandboxBrokerCommon::SendWithFd(int aFd, const iovec* aIO,
+                                        size_t aNumIO, int aPassedFd) {
   struct msghdr msg = {};
   msg.msg_iov = const_cast<iovec*>(aIO);
   msg.msg_iovlen = aNumIO;
 
   char cmsg_buf[CMSG_SPACE(sizeof(int))];
   memset(cmsg_buf, 0, sizeof(cmsg_buf));
   if (aPassedFd != -1) {
     msg.msg_control = cmsg_buf;
--- a/security/sandbox/linux/glue/SandboxPrefBridge.cpp
+++ b/security/sandbox/linux/glue/SandboxPrefBridge.cpp
@@ -8,18 +8,19 @@
 
 #include "mozilla/Preferences.h"
 #include "mozilla/SandboxSettings.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/ContentParent.h"  // for FILE_REMOTE_TYPE
 
 namespace mozilla {
 
-/* static */ ContentProcessSandboxParams
-ContentProcessSandboxParams::ForThisProcess(const dom::MaybeFileDesc& aBroker) {
+/* static */
+ContentProcessSandboxParams ContentProcessSandboxParams::ForThisProcess(
+    const dom::MaybeFileDesc& aBroker) {
   ContentProcessSandboxParams params;
   params.mLevel = GetEffectiveContentSandboxLevel();
 
   if (aBroker.type() == dom::MaybeFileDesc::TFileDescriptor) {
     auto fd = aBroker.get_FileDescriptor().ClonePlatformHandle();
     params.mBrokerFd = fd.release();
     // brokerFd < 0 means to allow direct filesystem access, so
     // make absolutely sure that doesn't happen if the parent
--- a/security/sandbox/linux/reporter/SandboxReporter.cpp
+++ b/security/sandbox/linux/reporter/SandboxReporter.cpp
@@ -69,17 +69,18 @@ SandboxReporter::~SandboxReporter() {
     return;
   }
   shutdown(mServerFd, SHUT_RD);
   PlatformThread::Join(mThread);
   close(mServerFd);
   close(mClientFd);
 }
 
-/* static */ SandboxReporter* SandboxReporter::Singleton() {
+/* static */
+SandboxReporter* SandboxReporter::Singleton() {
   static StaticMutex sMutex;
   StaticMutexAutoLock lock(sMutex);
 
   if (sSingleton == nullptr) {
     sSingleton = new SandboxReporter();
     if (!sSingleton->Init()) {
       // If socketpair or thread creation failed, trying to continue
       // with child process creation is unlikely to succeed; crash
--- a/security/sandbox/win/src/sandboxtarget/sandboxTarget.cpp
+++ b/security/sandbox/win/src/sandboxtarget/sandboxTarget.cpp
@@ -7,17 +7,18 @@
 #include "sandboxTarget.h"
 
 #include "sandbox/win/src/sandbox.h"
 
 namespace mozilla {
 
 // We need to define this function out of line so that clang-cl doesn't inline
 // it.
-/* static */ SandboxTarget* SandboxTarget::Instance() {
+/* static */
+SandboxTarget* SandboxTarget::Instance() {
   static SandboxTarget sb;
   return &sb;
 }
 
 void SandboxTarget::StartSandbox() {
   if (mTargetServices) {
     mTargetServices->LowerToken();
   }