Bug 1202828 - use nsEventQueue::HasPendingEvent in nsThread.cpp; r=mccr8
authorNathan Froyd <froydnj@mozilla.com>
Fri, 04 Sep 2015 20:39:10 -0400
changeset 294643 07af426942c0ec14e4ad9595290f44b774d8423f
parent 294642 72b0bd6c92fc185c7bfbc6e5263e8b02e2665185
child 294644 ce588ba0323d873829bbf3e5505619eaeb3f7236
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1202828
milestone43.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 1202828 - use nsEventQueue::HasPendingEvent in nsThread.cpp; r=mccr8 nsEventQueue's HasPending event is defined to simply: return GetEvent(false, nullptr); So we can substitute HasPendingEvent for this particular GetEvent call to make the code clearer.
xpcom/threads/nsThread.cpp
--- a/xpcom/threads/nsThread.cpp
+++ b/xpcom/threads/nsThread.cpp
@@ -697,17 +697,17 @@ nsThread::Shutdown()
 
 NS_IMETHODIMP
 nsThread::HasPendingEvents(bool* aResult)
 {
   if (NS_WARN_IF(PR_GetCurrentThread() != mThread)) {
     return NS_ERROR_NOT_SAME_THREAD;
   }
 
-  *aResult = mEvents->GetEvent(false, nullptr);
+  *aResult = mEvents->HasPendingEvent();
   return NS_OK;
 }
 
 #ifdef MOZ_CANARY
 void canary_alarm_handler(int signum);
 
 class Canary
 {