Bug 1253094, part 6 - Stop using DebugOnly for class/struct members in netwerk/. r=mayhemer
authorJonathan Watt <jwatt@jwatt.org>
Fri, 26 Feb 2016 15:52:07 +0000
changeset 326983 3365467dab5bbc45e63c6d21501fed6412b07d70
parent 326982 4d29ea20c231485d6020a136a45dcd9de6783a63
child 326984 216e73b3ea184912bc9890363c30bf11bc84a704
push id1146
push userCallek@gmail.com
push dateMon, 25 Jul 2016 16:35:44 +0000
treeherdermozilla-release@a55778f9cd5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1253094
milestone47.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 1253094, part 6 - Stop using DebugOnly for class/struct members in netwerk/. r=mayhemer MozReview-Commit-ID: Ab9bM9WI2uD
netwerk/cache2/CacheIOThread.cpp
netwerk/cache2/CacheIOThread.h
--- a/netwerk/cache2/CacheIOThread.cpp
+++ b/netwerk/cache2/CacheIOThread.cpp
@@ -22,17 +22,19 @@ CacheIOThread::CacheIOThread()
 : mMonitor("CacheIOThread")
 , mThread(nullptr)
 , mXPCOMThread(nullptr)
 , mLowestLevelWaiting(LAST_LEVEL)
 , mCurrentlyExecutingLevel(0)
 , mHasXPCOMEvents(false)
 , mRerunCurrentEvent(false)
 , mShutdown(false)
+#ifdef DEBUG
 , mInsideLoop(true)
+#endif
 {
   sSelf = this;
 }
 
 CacheIOThread::~CacheIOThread()
 {
   if (mXPCOMThread) {
     nsIThread *thread = mXPCOMThread;
@@ -237,18 +239,20 @@ loopStart:
 
       if (EventsPending())
         continue;
 
     } while (true);
 
     MOZ_ASSERT(!EventsPending());
 
+#ifdef DEBUG
     // This is for correct assertion on XPCOM events dispatch.
     mInsideLoop = false;
+#endif
   } // lock
 
   if (threadInternal)
     threadInternal->SetObserver(nullptr);
 }
 
 static const char* const sLevelTraceName[] = {
   "net::cache::io::level(0)",
--- a/netwerk/cache2/CacheIOThread.h
+++ b/netwerk/cache2/CacheIOThread.h
@@ -91,15 +91,17 @@ private:
   Atomic<nsIThread *> mXPCOMThread;
   Atomic<uint32_t, Relaxed> mLowestLevelWaiting;
   uint32_t mCurrentlyExecutingLevel;
   nsTArray<nsCOMPtr<nsIRunnable> > mEventQueue[LAST_LEVEL];
 
   Atomic<bool, Relaxed> mHasXPCOMEvents;
   bool mRerunCurrentEvent;
   bool mShutdown;
-  DebugOnly<bool> mInsideLoop;
+#ifdef DEBUG
+  bool mInsideLoop;
+#endif
 };
 
 } // namespace net
 } // namespace mozilla
 
 #endif