Bug 1591132 - Remove some useless ifdefs. r=nika draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 24 Oct 2019 16:39:00 +0000
changeset 2396057 b7e538bcb2281aa8ae4e43c5abbfb826c728c44a
parent 2396056 7a3ec68e4d0987616906f1371e4e6f68f7d55d4f
child 2396058 c13b62b13ce177ae0e959ec612617403b8144556
push id439687
push userreviewbot
push dateThu, 24 Oct 2019 16:39:19 +0000
treeherdertry@55d10b12661f [default view] [failures only]
reviewersnika
bugs1591132
milestone72.0a1
Bug 1591132 - Remove some useless ifdefs. r=nika Default constructors of members run if not specified there, and these ifdefs are ugly. Differential Diff: PHID-DIFF-nd3nuui6or5caj4thk6w
xpcom/ds/PLDHashTable.cpp
xpcom/ds/PLDHashTable.h
--- a/xpcom/ds/PLDHashTable.cpp
+++ b/xpcom/ds/PLDHashTable.cpp
@@ -182,20 +182,16 @@ PLDHashTable::PLDHashTable(const PLDHash
                            uint32_t aLength)
     : mOps(recordreplay::GeneratePLDHashTableCallbacks(aOps)),
       mEntryStore(),
       mGeneration(0),
       mHashShift(HashShift(aEntrySize, aLength)),
       mEntrySize(aEntrySize),
       mEntryCount(0),
       mRemovedCount(0)
-#ifdef DEBUG
-      ,
-      mChecker()
-#endif
 {
   // An entry size greater than 0xff is unlikely, but let's check anyway. If
   // you hit this, your hashtable would waste lots of space for unused entries
   // and you should change your hash table's entries to pointers.
   if (aEntrySize != uint32_t(mEntrySize)) {
     MOZ_CRASH("Entry size is too large");
   }
 }
--- a/xpcom/ds/PLDHashTable.h
+++ b/xpcom/ds/PLDHashTable.h
@@ -413,20 +413,16 @@ class PLDHashTable {
 
   PLDHashTable(PLDHashTable&& aOther)
       // Initialize fields which are checked by the move assignment operator
       // and the destructor (which the move assignment operator calls).
       : mOps(nullptr),
         mEntryStore(),
         mGeneration(0),
         mEntrySize(0)
-#ifdef DEBUG
-        ,
-        mChecker()
-#endif
   {
     *this = std::move(aOther);
   }
 
   PLDHashTable& operator=(PLDHashTable&& aOther);
 
   ~PLDHashTable();