Bug 995730 - Fix style violations in xpcom/base/ (part 2). r=froydnj
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Wed, 14 May 2014 23:14:58 +0300
changeset 195761 e836b7e1101399e0255eec9514bc6c3f0f8db490
parent 195760 1779847c002c38653e048da5ac414f3824561682
child 195762 f20eb963186959bde60b7ce8f505bb4903e19063
push id5990
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:40:24 +0000
treeherdermozilla-aurora@0796197efbc9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs995730
milestone32.0a1
Bug 995730 - Fix style violations in xpcom/base/ (part 2). r=froydnj
xpcom/base/StaticMutex.h
xpcom/base/StaticPtr.h
xpcom/base/VisualEventTracer.cpp
xpcom/base/nsAutoPtr.h
xpcom/base/nsCycleCollector.h
xpcom/base/nsDumpUtils.h
xpcom/base/nsMemoryInfoDumper.cpp
xpcom/base/nsStatusReporterManager.h
xpcom/base/nsWindowsHelpers.h
--- a/xpcom/base/StaticMutex.h
+++ b/xpcom/base/StaticMutex.h
@@ -68,17 +68,17 @@ private:
   Atomic<OffTheBooksMutex*> mMutex;
 
 
   // Disallow copy constructor, but only in debug mode.  We only define
   // a default constructor in debug mode (see above); if we declared
   // this constructor always, the compiler wouldn't generate a trivial
   // default constructor for us in non-debug mode.
 #ifdef DEBUG
-  StaticMutex(StaticMutex& other);
+  StaticMutex(StaticMutex& aOther);
 #endif
 
   // Disallow these operators.
   StaticMutex& operator=(StaticMutex* aRhs);
   static void* operator new(size_t) CPP_THROW_NEW;
   static void operator delete(void*);
 };
 
--- a/xpcom/base/StaticPtr.h
+++ b/xpcom/base/StaticPtr.h
@@ -76,17 +76,17 @@ public:
   }
 
 private:
   // Disallow copy constructor, but only in debug mode.  We only define
   // a default constructor in debug mode (see above); if we declared
   // this constructor always, the compiler wouldn't generate a trivial
   // default constructor for us in non-debug mode.
 #ifdef DEBUG
-  StaticAutoPtr(StaticAutoPtr<T>& other);
+  StaticAutoPtr(StaticAutoPtr<T>& aOther);
 #endif
 
   void Assign(T* aNewPtr)
   {
     MOZ_ASSERT(!aNewPtr || mRawPtr != aNewPtr);
     T* oldPtr = mRawPtr;
     mRawPtr = aNewPtr;
     delete oldPtr;
--- a/xpcom/base/VisualEventTracer.cpp
+++ b/xpcom/base/VisualEventTracer.cpp
@@ -126,17 +126,17 @@ public:
 
   size_t Length() const
   {
     return mNextRecord - mRecordsHead;
   }
   bool CanBeDeleted(const TimeStamp& aUntil) const;
 
   static RecordBatch* Register();
-  static void Close(void* data);  // Registered on freeing thread data
+  static void Close(void* aData);  // Registered on freeing thread data
   static RecordBatch* Clone(RecordBatch* aLog, const TimeStamp& aSince);
   static void Delete(RecordBatch* aLog);
 
   static RecordBatch* CloneLog();
   static void GCLog(const TimeStamp& aUntil);
   static void DeleteLog();
 
   Record* mRecordsHead;
@@ -176,19 +176,19 @@ RecordBatch::Register()
   }
   gLogTail = batch;
 
   mon.Notify();
   return batch;
 }
 
 void
-RecordBatch::Close(void* data)
+RecordBatch::Close(void* aData)
 {
-  RecordBatch* batch = static_cast<RecordBatch*>(data);
+  RecordBatch* batch = static_cast<RecordBatch*>(aData);
   batch->Close();
 }
 
 // static
 RecordBatch*
 RecordBatch::Clone(RecordBatch* aOther, const TimeStamp& aSince)
 {
   if (!aOther) {
@@ -328,93 +328,94 @@ RecordBatch::CanBeDeleted(const TimeStam
   // Not all conditions to close the batch met, keep it.
   return false;
 }
 
 // Helper class for filtering events by MOZ_PROFILING_EVENTS
 class EventFilter
 {
 public:
-  static EventFilter* Build(const char* filterVar);
-  bool EventPasses(const char* eventName);
+  static EventFilter* Build(const char* aFilterVar);
+  bool EventPasses(const char* aFilterVar);
 
   ~EventFilter()
   {
     delete mNext;
     PL_strfree(mFilter);
     MOZ_COUNT_DTOR(EventFilter);
   }
 
 private:
-  EventFilter(const char* eventName, EventFilter* next)
-    : mFilter(PL_strdup(eventName))
-    , mNext(next)
+  EventFilter(const char* aEventName, EventFilter* aNext)
+    : mFilter(PL_strdup(aEventName))
+    , mNext(aNext)
   {
     MOZ_COUNT_CTOR(EventFilter);
   }
 
   char* mFilter;
   EventFilter* mNext;
 };
 
 // static
 EventFilter*
-EventFilter::Build(const char* filterVar)
+EventFilter::Build(const char* aFilterVar)
 {
-  if (!filterVar || !*filterVar) {
+  if (!aFilterVar || !*aFilterVar) {
     return nullptr;
   }
 
   // Reads a comma serpatated list of events.
 
   // Copied from nspr logging code (read of NSPR_LOG_MODULES)
   char eventName[64];
   int pos = 0, count, delta = 0;
 
   // Read up to a comma or EOF -> get name of an event first in the list
-  count = sscanf(filterVar, "%63[^,]%n", eventName, &delta);
+  count = sscanf(aFilterVar, "%63[^,]%n", eventName, &delta);
   if (count == 0) {
     return nullptr;
   }
 
   pos = delta;
 
   // Skip a comma, if present, accept spaces around it
-  count = sscanf(filterVar + pos, " , %n", &delta);
+  count = sscanf(aFilterVar + pos, " , %n", &delta);
   if (count != EOF) {
     pos += delta;
   }
 
   // eventName contains name of the first event in the list
   // second argument recursively parses the rest of the list string and
   // fills mNext of the just created EventFilter object chaining the objects
-  return new EventFilter(eventName, Build(filterVar + pos));
+  return new EventFilter(eventName, Build(aFilterVar + pos));
 }
 
 bool
-EventFilter::EventPasses(const char* eventName)
+EventFilter::EventPasses(const char* aEventName)
 {
-  if (!strcmp(eventName, mFilter)) {
+  if (!strcmp(aEventName, mFilter)) {
     return true;
   }
 
   if (mNext) {
-    return mNext->EventPasses(eventName);
+    return mNext->EventPasses(aEventName);
   }
 
   return false;
 }
 
 // State and control variables, initialized in Init() method, after it
 // immutable and read concurently.
 EventFilter* gEventFilter = nullptr;
 unsigned gThreadPrivateIndex;
 
 // static
-bool CheckEventFilters(uint32_t aType, void* aItem, const char* aText)
+bool
+CheckEventFilters(uint32_t aType, void* aItem, const char* aText)
 {
   if (!gEventFilter) {
     return true;
   }
 
   if (aType == eName) {
     return true;
   }
@@ -555,17 +556,17 @@ protected:
 NS_IMPL_ISUPPORTS(VisualEventTracerLog, nsIVisualEventTracerLog)
 
 VisualEventTracerLog::~VisualEventTracerLog()
 {
   RecordBatch::Delete(mBatch);
 }
 
 NS_IMETHODIMP
-VisualEventTracerLog::GetJSONString(nsACString& _retval)
+VisualEventTracerLog::GetJSONString(nsACString& aResult)
 {
   nsCString buffer;
 
   buffer.Assign(NS_LITERAL_CSTRING("{\n\"version\": 1,\n\"records\":[\n"));
 
   RecordBatch* batch = mBatch;
   while (batch) {
     if (batch != mBatch) {
@@ -604,17 +605,17 @@ VisualEventTracerLog::GetJSONString(nsAC
 
     buffer.Append(NS_LITERAL_CSTRING("]}\n"));
 
     RecordBatch* next = batch->mNextBatch;
     batch = next;
   }
 
   buffer.Append(NS_LITERAL_CSTRING("]}\n"));
-  _retval.Assign(buffer);
+  aResult.Assign(buffer);
 
   return NS_OK;
 }
 
 nsresult
 VisualEventTracerLog::WriteToProfilingFile()
 {
   const char* filename = PR_GetEnv("MOZ_TRACE_FILE");
@@ -693,26 +694,26 @@ VisualEventTracer::Stop()
       rv = tracelog->WriteToProfilingFile();
     }
   }
 
   return rv;
 }
 
 NS_IMETHODIMP
-VisualEventTracer::Snapshot(nsIVisualEventTracerLog** _result)
+VisualEventTracer::Snapshot(nsIVisualEventTracerLog** aResult)
 {
   if (!gInitialized) {
     return NS_ERROR_UNEXPECTED;
   }
 
   RecordBatch* batch = RecordBatch::CloneLog();
 
   nsRefPtr<VisualEventTracerLog> log = new VisualEventTracerLog(batch);
-  log.forget(_result);
+  log.forget(aResult);
 
   return NS_OK;
 }
 
 #endif
 
 } // eventtracer
 } // mozilla
--- a/xpcom/base/nsAutoPtr.h
+++ b/xpcom/base/nsAutoPtr.h
@@ -208,26 +208,24 @@ public:
 #else
     assign(0);
     return reinterpret_cast<T**>(&mRawPtr);
 #endif
   }
 };
 
 template <class T>
-inline
-nsAutoPtr<T>*
+inline nsAutoPtr<T>*
 address_of(nsAutoPtr<T>& aPtr)
 {
   return aPtr.get_address();
 }
 
 template <class T>
-inline
-const nsAutoPtr<T>*
+inline const nsAutoPtr<T>*
 address_of(const nsAutoPtr<T>& aPtr)
 {
   return aPtr.get_address();
 }
 
 template <class T>
 class nsAutoPtrGetterTransfers
 /*
@@ -272,186 +270,169 @@ public:
     return *(mTargetSmartPtr.StartAssignment());
   }
 
 private:
   nsAutoPtr<T>& mTargetSmartPtr;
 };
 
 template <class T>
-inline
-nsAutoPtrGetterTransfers<T>
+inline nsAutoPtrGetterTransfers<T>
 getter_Transfers(nsAutoPtr<T>& aSmartPtr)
 /*
   Used around a |nsAutoPtr| when
   ...makes the class |nsAutoPtrGetterTransfers<T>| invisible.
 */
 {
   return nsAutoPtrGetterTransfers<T>(aSmartPtr);
 }
 
 
 
 // Comparing two |nsAutoPtr|s
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(const nsAutoPtr<T>& aLhs, const nsAutoPtr<U>& aRhs)
 {
   return static_cast<const T*>(aLhs.get()) == static_cast<const U*>(aRhs.get());
 }
 
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(const nsAutoPtr<T>& aLhs, const nsAutoPtr<U>& aRhs)
 {
   return static_cast<const T*>(aLhs.get()) != static_cast<const U*>(aRhs.get());
 }
 
 
 // Comparing an |nsAutoPtr| to a raw pointer
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(const nsAutoPtr<T>& aLhs, const U* aRhs)
 {
   return static_cast<const T*>(aLhs.get()) == static_cast<const U*>(aRhs);
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(const U* aLhs, const nsAutoPtr<T>& aRhs)
 {
   return static_cast<const U*>(aLhs) == static_cast<const T*>(aRhs.get());
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(const nsAutoPtr<T>& aLhs, const U* aRhs)
 {
   return static_cast<const T*>(aLhs.get()) != static_cast<const U*>(aRhs);
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(const U* aLhs, const nsAutoPtr<T>& aRhs)
 {
   return static_cast<const U*>(aLhs) != static_cast<const T*>(aRhs.get());
 }
 
 // To avoid ambiguities caused by the presence of builtin |operator==|s
 // creating a situation where one of the |operator==| defined above
 // has a better conversion for one argument and the builtin has a
 // better conversion for the other argument, define additional
 // |operator==| without the |const| on the raw pointer.
 // See bug 65664 for details.
 
 #ifndef NSCAP_DONT_PROVIDE_NONCONST_OPEQ
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(const nsAutoPtr<T>& aLhs, U* aRhs)
 {
   return static_cast<const T*>(aLhs.get()) == const_cast<const U*>(aRhs);
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(U* aLhs, const nsAutoPtr<T>& aRhs)
 {
   return const_cast<const U*>(aLhs) == static_cast<const T*>(aRhs.get());
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(const nsAutoPtr<T>& aLhs, U* aRhs)
 {
   return static_cast<const T*>(aLhs.get()) != const_cast<const U*>(aRhs);
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(U* aLhs, const nsAutoPtr<T>& aRhs)
 {
   return const_cast<const U*>(aLhs) != static_cast<const T*>(aRhs.get());
 }
 #endif
 
 
 
 // Comparing an |nsAutoPtr| to |0|
 
 template <class T>
-inline
-bool
+inline bool
 operator==(const nsAutoPtr<T>& aLhs, NSCAP_Zero* aRhs)
 // specifically to allow |smartPtr == 0|
 {
   return static_cast<const void*>(aLhs.get()) == reinterpret_cast<const void*>(aRhs);
 }
 
 template <class T>
-inline
-bool
+inline bool
 operator==(NSCAP_Zero* aLhs, const nsAutoPtr<T>& aRhs)
 // specifically to allow |0 == smartPtr|
 {
   return reinterpret_cast<const void*>(aLhs) == static_cast<const void*>(aRhs.get());
 }
 
 template <class T>
-inline
-bool
+inline bool
 operator!=(const nsAutoPtr<T>& aLhs, NSCAP_Zero* aRhs)
 // specifically to allow |smartPtr != 0|
 {
   return static_cast<const void*>(aLhs.get()) != reinterpret_cast<const void*>(aRhs);
 }
 
 template <class T>
-inline
-bool
+inline bool
 operator!=(NSCAP_Zero* aLhs, const nsAutoPtr<T>& aRhs)
 // specifically to allow |0 != smartPtr|
 {
   return reinterpret_cast<const void*>(aLhs) != static_cast<const void*>(aRhs.get());
 }
 
 
 #ifdef HAVE_CPP_TROUBLE_COMPARING_TO_ZERO
 
 // We need to explicitly define comparison operators for `int'
 // because the compiler is lame.
 
 template <class T>
-inline
-bool
-operator==(const nsAutoPtr<T>& lhs, int rhs)
+inline bool
+operator==(const nsAutoPtr<T>& aLhs, int aRhs)
 // specifically to allow |smartPtr == 0|
 {
-  return static_cast<const void*>(lhs.get()) == reinterpret_cast<const void*>(rhs);
+  return static_cast<const void*>(aLhs.get()) == reinterpret_cast<const void*>(aRhs);
 }
 
 template <class T>
-inline
-bool
-operator==(int lhs, const nsAutoPtr<T>& rhs)
+inline bool
+operator==(int aLhs, const nsAutoPtr<T>& aRhs)
 // specifically to allow |0 == smartPtr|
 {
-  return reinterpret_cast<const void*>(lhs) == static_cast<const void*>(rhs.get());
+  return reinterpret_cast<const void*>(aLhs) == static_cast<const void*>(aRhs.get());
 }
 
 #endif // !defined(HAVE_CPP_TROUBLE_COMPARING_TO_ZERO)
 
 /*****************************************************************************/
 
 // template <class T> class nsAutoArrayPtrGetterTransfers;
 
@@ -611,26 +592,24 @@ public:
   size_t
   SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 };
 
 template <class T>
-inline
-nsAutoArrayPtr<T>*
+inline nsAutoArrayPtr<T>*
 address_of(nsAutoArrayPtr<T>& aPtr)
 {
   return aPtr.get_address();
 }
 
 template <class T>
-inline
-const nsAutoArrayPtr<T>*
+inline const nsAutoArrayPtr<T>*
 address_of(const nsAutoArrayPtr<T>& aPtr)
 {
   return aPtr.get_address();
 }
 
 template <class T>
 class nsAutoArrayPtrGetterTransfers
 /*
@@ -675,186 +654,169 @@ public:
     return *(mTargetSmartPtr.StartAssignment());
   }
 
 private:
   nsAutoArrayPtr<T>& mTargetSmartPtr;
 };
 
 template <class T>
-inline
-nsAutoArrayPtrGetterTransfers<T>
+inline nsAutoArrayPtrGetterTransfers<T>
 getter_Transfers(nsAutoArrayPtr<T>& aSmartPtr)
 /*
   Used around a |nsAutoArrayPtr| when
   ...makes the class |nsAutoArrayPtrGetterTransfers<T>| invisible.
 */
 {
   return nsAutoArrayPtrGetterTransfers<T>(aSmartPtr);
 }
 
 
 
 // Comparing two |nsAutoArrayPtr|s
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(const nsAutoArrayPtr<T>& aLhs, const nsAutoArrayPtr<U>& aRhs)
 {
   return static_cast<const T*>(aLhs.get()) == static_cast<const U*>(aRhs.get());
 }
 
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(const nsAutoArrayPtr<T>& aLhs, const nsAutoArrayPtr<U>& aRhs)
 {
   return static_cast<const T*>(aLhs.get()) != static_cast<const U*>(aRhs.get());
 }
 
 
 // Comparing an |nsAutoArrayPtr| to a raw pointer
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(const nsAutoArrayPtr<T>& aLhs, const U* aRhs)
 {
   return static_cast<const T*>(aLhs.get()) == static_cast<const U*>(aRhs);
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(const U* aLhs, const nsAutoArrayPtr<T>& aRhs)
 {
   return static_cast<const U*>(aLhs) == static_cast<const T*>(aRhs.get());
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(const nsAutoArrayPtr<T>& aLhs, const U* aRhs)
 {
   return static_cast<const T*>(aLhs.get()) != static_cast<const U*>(aRhs);
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(const U* aLhs, const nsAutoArrayPtr<T>& aRhs)
 {
   return static_cast<const U*>(aLhs) != static_cast<const T*>(aRhs.get());
 }
 
 // To avoid ambiguities caused by the presence of builtin |operator==|s
 // creating a situation where one of the |operator==| defined above
 // has a better conversion for one argument and the builtin has a
 // better conversion for the other argument, define additional
 // |operator==| without the |const| on the raw pointer.
 // See bug 65664 for details.
 
 #ifndef NSCAP_DONT_PROVIDE_NONCONST_OPEQ
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(const nsAutoArrayPtr<T>& aLhs, U* aRhs)
 {
   return static_cast<const T*>(aLhs.get()) == const_cast<const U*>(aRhs);
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(U* aLhs, const nsAutoArrayPtr<T>& aRhs)
 {
   return const_cast<const U*>(aLhs) == static_cast<const T*>(aRhs.get());
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(const nsAutoArrayPtr<T>& aLhs, U* aRhs)
 {
   return static_cast<const T*>(aLhs.get()) != const_cast<const U*>(aRhs);
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(U* aLhs, const nsAutoArrayPtr<T>& aRhs)
 {
   return const_cast<const U*>(aLhs) != static_cast<const T*>(aRhs.get());
 }
 #endif
 
 
 
 // Comparing an |nsAutoArrayPtr| to |0|
 
 template <class T>
-inline
-bool
+inline bool
 operator==(const nsAutoArrayPtr<T>& aLhs, NSCAP_Zero* aRhs)
 // specifically to allow |smartPtr == 0|
 {
   return static_cast<const void*>(aLhs.get()) == reinterpret_cast<const void*>(aRhs);
 }
 
 template <class T>
-inline
-bool
+inline bool
 operator==(NSCAP_Zero* aLhs, const nsAutoArrayPtr<T>& aRhs)
 // specifically to allow |0 == smartPtr|
 {
   return reinterpret_cast<const void*>(aLhs) == static_cast<const void*>(aRhs.get());
 }
 
 template <class T>
-inline
-bool
+inline bool
 operator!=(const nsAutoArrayPtr<T>& aLhs, NSCAP_Zero* aRhs)
 // specifically to allow |smartPtr != 0|
 {
   return static_cast<const void*>(aLhs.get()) != reinterpret_cast<const void*>(aRhs);
 }
 
 template <class T>
-inline
-bool
+inline bool
 operator!=(NSCAP_Zero* aLhs, const nsAutoArrayPtr<T>& aRhs)
 // specifically to allow |0 != smartPtr|
 {
   return reinterpret_cast<const void*>(aLhs) != static_cast<const void*>(aRhs.get());
 }
 
 
 #ifdef HAVE_CPP_TROUBLE_COMPARING_TO_ZERO
 
 // We need to explicitly define comparison operators for `int'
 // because the compiler is lame.
 
 template <class T>
-inline
-bool
-operator==(const nsAutoArrayPtr<T>& lhs, int rhs)
+inline bool
+operator==(const nsAutoArrayPtr<T>& aLhs, int aRhs)
 // specifically to allow |smartPtr == 0|
 {
-  return static_cast<const void*>(lhs.get()) == reinterpret_cast<const void*>(rhs);
+  return static_cast<const void*>(aLhs.get()) == reinterpret_cast<const void*>(aRhs);
 }
 
 template <class T>
-inline
-bool
-operator==(int lhs, const nsAutoArrayPtr<T>& rhs)
+inline bool
+operator==(int aLhs, const nsAutoArrayPtr<T>& aRhs)
 // specifically to allow |0 == smartPtr|
 {
-  return reinterpret_cast<const void*>(lhs) == static_cast<const void*>(rhs.get());
+  return reinterpret_cast<const void*>(aLhs) == static_cast<const void*>(aRhs.get());
 }
 
 #endif // !defined(HAVE_CPP_TROUBLE_COMPARING_TO_ZERO)
 
 
 /*****************************************************************************/
 
 // template <class T> class nsRefPtrGetterAddRefs;
@@ -1152,26 +1114,24 @@ ImplCycleCollectionTraverse(nsCycleColle
                             nsRefPtr<T>& aField,
                             const char* aName,
                             uint32_t aFlags = 0)
 {
   CycleCollectionNoteChild(aCallback, aField.get(), aName, aFlags);
 }
 
 template <class T>
-inline
-nsRefPtr<T>*
+inline nsRefPtr<T>*
 address_of(nsRefPtr<T>& aPtr)
 {
   return aPtr.get_address();
 }
 
 template <class T>
-inline
-const nsRefPtr<T>*
+inline const nsRefPtr<T>*
 address_of(const nsRefPtr<T>& aPtr)
 {
   return aPtr.get_address();
 }
 
 template <class T>
 class nsRefPtrGetterAddRefs
 /*
@@ -1216,193 +1176,175 @@ public:
     return *(mTargetSmartPtr.StartAssignment());
   }
 
 private:
   nsRefPtr<T>& mTargetSmartPtr;
 };
 
 template <class T>
-inline
-nsRefPtrGetterAddRefs<T>
+inline nsRefPtrGetterAddRefs<T>
 getter_AddRefs(nsRefPtr<T>& aSmartPtr)
 /*
   Used around a |nsRefPtr| when
   ...makes the class |nsRefPtrGetterAddRefs<T>| invisible.
 */
 {
   return nsRefPtrGetterAddRefs<T>(aSmartPtr);
 }
 
 
 
 // Comparing two |nsRefPtr|s
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(const nsRefPtr<T>& aLhs, const nsRefPtr<U>& aRhs)
 {
   return static_cast<const T*>(aLhs.get()) == static_cast<const U*>(aRhs.get());
 }
 
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(const nsRefPtr<T>& aLhs, const nsRefPtr<U>& aRhs)
 {
   return static_cast<const T*>(aLhs.get()) != static_cast<const U*>(aRhs.get());
 }
 
 
 // Comparing an |nsRefPtr| to a raw pointer
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(const nsRefPtr<T>& aLhs, const U* aRhs)
 {
   return static_cast<const T*>(aLhs.get()) == static_cast<const U*>(aRhs);
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(const U* aLhs, const nsRefPtr<T>& aRhs)
 {
   return static_cast<const U*>(aLhs) == static_cast<const T*>(aRhs.get());
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(const nsRefPtr<T>& aLhs, const U* aRhs)
 {
   return static_cast<const T*>(aLhs.get()) != static_cast<const U*>(aRhs);
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(const U* aLhs, const nsRefPtr<T>& aRhs)
 {
   return static_cast<const U*>(aLhs) != static_cast<const T*>(aRhs.get());
 }
 
 // To avoid ambiguities caused by the presence of builtin |operator==|s
 // creating a situation where one of the |operator==| defined above
 // has a better conversion for one argument and the builtin has a
 // better conversion for the other argument, define additional
 // |operator==| without the |const| on the raw pointer.
 // See bug 65664 for details.
 
 #ifndef NSCAP_DONT_PROVIDE_NONCONST_OPEQ
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(const nsRefPtr<T>& aLhs, U* aRhs)
 {
   return static_cast<const T*>(aLhs.get()) == const_cast<const U*>(aRhs);
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator==(U* aLhs, const nsRefPtr<T>& aRhs)
 {
   return const_cast<const U*>(aLhs) == static_cast<const T*>(aRhs.get());
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(const nsRefPtr<T>& aLhs, U* aRhs)
 {
   return static_cast<const T*>(aLhs.get()) != const_cast<const U*>(aRhs);
 }
 
 template <class T, class U>
-inline
-bool
+inline bool
 operator!=(U* aLhs, const nsRefPtr<T>& aRhs)
 {
   return const_cast<const U*>(aLhs) != static_cast<const T*>(aRhs.get());
 }
 #endif
 
 
 
 // Comparing an |nsRefPtr| to |0|
 
 template <class T>
-inline
-bool
+inline bool
 operator==(const nsRefPtr<T>& aLhs, NSCAP_Zero* aRhs)
 // specifically to allow |smartPtr == 0|
 {
   return static_cast<const void*>(aLhs.get()) == reinterpret_cast<const void*>(aRhs);
 }
 
 template <class T>
-inline
-bool
+inline bool
 operator==(NSCAP_Zero* aLhs, const nsRefPtr<T>& aRhs)
 // specifically to allow |0 == smartPtr|
 {
   return reinterpret_cast<const void*>(aLhs) == static_cast<const void*>(aRhs.get());
 }
 
 template <class T>
-inline
-bool
+inline bool
 operator!=(const nsRefPtr<T>& aLhs, NSCAP_Zero* aRhs)
 // specifically to allow |smartPtr != 0|
 {
   return static_cast<const void*>(aLhs.get()) != reinterpret_cast<const void*>(aRhs);
 }
 
 template <class T>
-inline
-bool
+inline bool
 operator!=(NSCAP_Zero* aLhs, const nsRefPtr<T>& aRhs)
 // specifically to allow |0 != smartPtr|
 {
   return reinterpret_cast<const void*>(aLhs) != static_cast<const void*>(aRhs.get());
 }
 
 
 #ifdef HAVE_CPP_TROUBLE_COMPARING_TO_ZERO
 
 // We need to explicitly define comparison operators for `int'
 // because the compiler is lame.
 
 template <class T>
-inline
-bool
-operator==(const nsRefPtr<T>& lhs, int rhs)
+inline bool
+operator==(const nsRefPtr<T>& aLhs, int aRhs)
 // specifically to allow |smartPtr == 0|
 {
-  return static_cast<const void*>(lhs.get()) == reinterpret_cast<const void*>(rhs);
+  return static_cast<const void*>(aLhs.get()) == reinterpret_cast<const void*>(aRhs);
 }
 
 template <class T>
-inline
-bool
-operator==(int lhs, const nsRefPtr<T>& rhs)
+inline bool
+operator==(int aLhs, const nsRefPtr<T>& aRhs)
 // specifically to allow |0 == smartPtr|
 {
-  return reinterpret_cast<const void*>(lhs) == static_cast<const void*>(rhs.get());
+  return reinterpret_cast<const void*>(aLhs) == static_cast<const void*>(aRhs.get());
 }
 
 #endif // !defined(HAVE_CPP_TROUBLE_COMPARING_TO_ZERO)
 
 template <class SourceType, class DestinationType>
-inline
-nsresult
+inline nsresult
 CallQueryInterface(nsRefPtr<SourceType>& aSourcePtr, DestinationType** aDestPtr)
 {
   return CallQueryInterface(aSourcePtr.get(), aDestPtr);
 }
 
 /*****************************************************************************/
 
 template<class T>
@@ -1445,58 +1387,52 @@ public:
     return status;
   }
 private:
   T* mRawPtr;
   nsresult* mErrorPtr;
 };
 
 template<class T>
-inline
-nsQueryObject<T>
+inline nsQueryObject<T>
 do_QueryObject(T* aRawPtr)
 {
   return nsQueryObject<T>(aRawPtr);
 }
 
 template<class T>
-inline
-nsQueryObject<T>
+inline nsQueryObject<T>
 do_QueryObject(nsCOMPtr<T>& aRawPtr)
 {
   return nsQueryObject<T>(aRawPtr);
 }
 
 template<class T>
-inline
-nsQueryObject<T>
+inline nsQueryObject<T>
 do_QueryObject(nsRefPtr<T>& aRawPtr)
 {
   return nsQueryObject<T>(aRawPtr);
 }
 
 template<class T>
-inline
-nsQueryObjectWithError<T>
+inline nsQueryObjectWithError<T>
 do_QueryObject(T* aRawPtr, nsresult* aErrorPtr)
 {
   return nsQueryObjectWithError<T>(aRawPtr, aErrorPtr);
 }
 
 template<class T>
-inline
-nsQueryObjectWithError<T>
+inline nsQueryObjectWithError<T>
 do_QueryObject(nsCOMPtr<T>& aRawPtr, nsresult* aErrorPtr)
 {
   return nsQueryObjectWithError<T>(aRawPtr, aErrorPtr);
 }
 
 template<class T>
-inline
-nsQueryObjectWithError<T>
+inline nsQueryObjectWithError<T>
 do_QueryObject(nsRefPtr<T>& aRawPtr, nsresult* aErrorPtr)
 {
   return nsQueryObjectWithError<T>(aRawPtr, aErrorPtr);
 }
 
 /*****************************************************************************/
 
 #endif // !defined(nsAutoPtr_h___)
--- a/xpcom/base/nsCycleCollector.h
+++ b/xpcom/base/nsCycleCollector.h
@@ -14,18 +14,18 @@ template<class T> struct already_AddRefe
 #include "nsError.h"
 #include "nsID.h"
 
 namespace mozilla {
 
 class CycleCollectedJSRuntime;
 
 // See the comments in nsContentUtils.h for explanations of these functions.
-typedef void* (*DeferredFinalizeAppendFunction)(void* pointers, void* thing);
-typedef bool (*DeferredFinalizeFunction)(uint32_t slice, void* data);
+typedef void* (*DeferredFinalizeAppendFunction)(void* aPointers, void* aThing);
+typedef bool (*DeferredFinalizeFunction)(uint32_t aSlice, void* aData);
 
 }
 
 bool nsCycleCollector_init();
 
 void nsCycleCollector_startup();
 
 typedef void (*CC_BeforeUnlinkCallback)(void);
--- a/xpcom/base/nsDumpUtils.h
+++ b/xpcom/base/nsDumpUtils.h
@@ -94,17 +94,17 @@ public:
     XRE_GetIOMessageLoop()->PostTask(
       FROM_HERE,
       NewRunnableMethod(this, &FdWatcher::StopWatching));
 
     return NS_OK;
   }
 };
 
-typedef void (* FifoCallback)(const nsCString& inputStr);
+typedef void (*FifoCallback)(const nsCString& aInputStr);
 struct FifoInfo
 {
   nsCString mCommand;
   FifoCallback mCallback;
 };
 typedef nsTArray<FifoInfo> FifoInfoArray;
 
 class FifoWatcher : public FdWatcher
@@ -137,17 +137,17 @@ private:
     , mFifoInfoLock("FifoWatcher.mFifoInfoLock")
   {
   }
 
   mozilla::Mutex mFifoInfoLock; // protects mFifoInfo
   FifoInfoArray mFifoInfo;
 };
 
-typedef void (* PipeCallback)(const uint8_t recvSig);
+typedef void (*PipeCallback)(const uint8_t aRecvSig);
 struct SignalInfo
 {
   uint8_t mSignal;
   PipeCallback mCallback;
 };
 typedef nsTArray<SignalInfo> SignalInfoArray;
 
 class SignalPipeWatcher : public FdWatcher
--- a/xpcom/base/nsMemoryInfoDumper.cpp
+++ b/xpcom/base/nsMemoryInfoDumper.cpp
@@ -149,30 +149,30 @@ namespace {
  */
 
 // It turns out that at least on some systems, SIGRTMIN is not a compile-time
 // constant, so these have to be set at runtime.
 static uint8_t sDumpAboutMemorySignum;         // SIGRTMIN
 static uint8_t sDumpAboutMemoryAfterMMUSignum; // SIGRTMIN + 1
 static uint8_t sGCAndCCDumpSignum;             // SIGRTMIN + 2
 
-void doMemoryReport(const uint8_t recvSig)
+void doMemoryReport(const uint8_t aRecvSig)
 {
   // Dump our memory reports (but run this on the main thread!).
-  bool doMMUFirst = recvSig == sDumpAboutMemoryAfterMMUSignum;
-  LOG("SignalWatcher(sig %d) dispatching memory report runnable.", recvSig);
+  bool doMMUFirst = aRecvSig == sDumpAboutMemoryAfterMMUSignum;
+  LOG("SignalWatcher(sig %d) dispatching memory report runnable.", aRecvSig);
   nsRefPtr<DumpMemoryInfoToTempDirRunnable> runnable =
     new DumpMemoryInfoToTempDirRunnable(/* identifier = */ EmptyString(),
                                         doMMUFirst);
   NS_DispatchToMainThread(runnable);
 }
 
-void doGCCCDump(const uint8_t recvSig)
+void doGCCCDump(const uint8_t aRecvSig)
 {
-  LOG("SignalWatcher(sig %d) dispatching GC/CC log runnable.", recvSig);
+  LOG("SignalWatcher(sig %d) dispatching GC/CC log runnable.", aRecvSig);
   // Dump GC and CC logs (from the main thread).
   nsRefPtr<GCAndCCLogDumpRunnable> runnable =
     new GCAndCCLogDumpRunnable(
       /* identifier = */ EmptyString(),
       /* allTraces = */ true,
       /* dumpChildProcesses = */ true);
   NS_DispatchToMainThread(runnable);
 }
--- a/xpcom/base/nsStatusReporterManager.h
+++ b/xpcom/base/nsStatusReporterManager.h
@@ -10,18 +10,17 @@
 #include "nsString.h"
 
 class nsStatusReporter MOZ_FINAL : public nsIStatusReporter
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISTATUSREPORTER
 
-  nsStatusReporter(nsACString& process,
-                   nsACString& desc);
+  nsStatusReporter(nsACString& aProcess, nsACString& aDesc);
 
   virtual ~nsStatusReporter();
 
 protected:
   nsCString sProcess;
   nsCString sName;
   nsCString sDesc;
 };
@@ -32,10 +31,10 @@ class nsStatusReporterManager : public n
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISTATUSREPORTERMANAGER
 
   nsStatusReporterManager();
   virtual ~nsStatusReporterManager();
 
 private:
-  nsCOMArray<nsIStatusReporter>      mReporters;
+  nsCOMArray<nsIStatusReporter> mReporters;
 };
--- a/xpcom/base/nsWindowsHelpers.h
+++ b/xpcom/base/nsWindowsHelpers.h
@@ -136,17 +136,17 @@ IsRunningInWindowsMetro()
     return isMetro;
   }
 
   HMODULE user32DLL = LoadLibraryW(L"user32.dll");
   if (!user32DLL) {
     return false;
   }
 
-  typedef BOOL (WINAPI* IsImmersiveProcessFunc)(HANDLE process);
+  typedef BOOL (WINAPI* IsImmersiveProcessFunc)(HANDLE aProcess);
   IsImmersiveProcessFunc IsImmersiveProcessPtr =
     (IsImmersiveProcessFunc)GetProcAddress(user32DLL,
                                            "IsImmersiveProcess");
   FreeLibrary(user32DLL);
   if (!IsImmersiveProcessPtr) {
     // isMetro is already set to false.
     alreadyChecked = true;
     return false;