Bug 1287006 - Final bustage followup. r=bustage in a still-CLOSED TREE
authorJeff Walden <jwalden@mit.edu>
Wed, 22 Feb 2017 20:46:46 -0800
changeset 373494 57775a0cc6f42b207d686499ffd847ebae0fcb03
parent 373493 bc8c006751c6b4e526de1b15f4e8048f7a6cf8e6
child 373495 6d5d1dfa86961f5e968c0566d673741c6d08774e
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1287006
milestone54.0a1
Bug 1287006 - Final bustage followup. r=bustage in a still-CLOSED TREE
ipc/glue/CrossProcessSemaphore.h
ipc/glue/CrossProcessSemaphore_posix.cpp
ipc/glue/CrossProcessSemaphore_unimplemented.cpp
ipc/glue/CrossProcessSemaphore_windows.cpp
--- a/ipc/glue/CrossProcessSemaphore.h
+++ b/ipc/glue/CrossProcessSemaphore.h
@@ -56,17 +56,17 @@ public:
   ~CrossProcessSemaphore();
 
   /**
    * Decrements the current value of the semaphore. This will block if the
    * current value of the semaphore is 0, up to a maximum of aWaitTime (if
    * specified).
    * Returns true if the semaphore was succesfully decremented, false otherwise.
    **/
-  bool Wait(Maybe<TimeDuration> aWaitTime = Nothing());
+  bool Wait(const Maybe<TimeDuration>& aWaitTime = Nothing());
 
   /**
    * Increments the current value of the semaphore.
    **/
   void Signal();
 
   /**
    * ShareToProcess
--- a/ipc/glue/CrossProcessSemaphore_posix.cpp
+++ b/ipc/glue/CrossProcessSemaphore_posix.cpp
@@ -104,17 +104,17 @@ CrossProcessSemaphore::~CrossProcessSema
     // Nothing can be done if the destroy fails so ignore return code.
     Unused << sem_destroy(mSemaphore);
   }
 
   MOZ_COUNT_DTOR(CrossProcessSemaphore);
 }
 
 bool
-CrossProcessSemaphore::Wait(Maybe<TimeDuration> aWaitTime)
+CrossProcessSemaphore::Wait(const Maybe<TimeDuration>& aWaitTime)
 {
   MOZ_ASSERT(*mRefCount > 0, "Attempting to wait on a semaphore with zero ref count");
   int ret;
   if (aWaitTime.isSome()) {
     struct timespec ts;
     if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
       return false;
     }
--- a/ipc/glue/CrossProcessSemaphore_unimplemented.cpp
+++ b/ipc/glue/CrossProcessSemaphore_unimplemented.cpp
@@ -21,17 +21,17 @@ CrossProcessSemaphore::CrossProcessSemap
 }
 
 CrossProcessSemaphore::~CrossProcessSemaphore()
 {
   MOZ_CRASH("Cross-process semaphores not allowed on this platform - woah! We should've aborted by now!");
 }
 
 bool
-CrossProcessSemaphore::Wait(Maybe<TimeDuration> aWaitTime)
+CrossProcessSemaphore::Wait(const Maybe<TimeDuration>& aWaitTime)
 {
   MOZ_CRASH("Cross-process semaphores not allowed on this platform - woah! We should've aborted by now!");
   return false;
 }
 
 void
 CrossProcessSemaphore::Signal()
 {
--- a/ipc/glue/CrossProcessSemaphore_windows.cpp
+++ b/ipc/glue/CrossProcessSemaphore_windows.cpp
@@ -42,17 +42,17 @@ CrossProcessSemaphore::CrossProcessSemap
 CrossProcessSemaphore::~CrossProcessSemaphore()
 {
   MOZ_ASSERT(mSemaphore, "Improper construction of semaphore or double free.");
   ::CloseHandle(mSemaphore);
   MOZ_COUNT_DTOR(CrossProcessSemaphore);
 }
 
 bool
-CrossProcessSemaphore::Wait(Maybe<TimeDuration> aWaitTime)
+CrossProcessSemaphore::Wait(const Maybe<TimeDuration>& aWaitTime)
 {
   MOZ_ASSERT(mSemaphore, "Improper construction of semaphore.");
   HRESULT hr = ::WaitForSingleObject(mSemaphore, aWaitTime.isSome() ?
                                                  aWaitTime->ToMilliseconds() :
                                                  INFINITE);
   return hr == WAIT_OBJECT_0;
 }