summaryrefslogtreecommitdiffstats
path: root/js/src/gc
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/gc')
-rw-r--r--js/src/gc/GCInternals.h5
-rw-r--r--js/src/gc/Statistics.h18
2 files changed, 9 insertions, 14 deletions
diff --git a/js/src/gc/GCInternals.h b/js/src/gc/GCInternals.h
index 4919b87a5..e8df0bb70 100644
--- a/js/src/gc/GCInternals.h
+++ b/js/src/gc/GCInternals.h
@@ -9,7 +9,6 @@
#include "mozilla/ArrayUtils.h"
#include "mozilla/Maybe.h"
-#include "mozilla/PodOperations.h"
#include "jscntxt.h"
@@ -102,9 +101,9 @@ struct TenureCountCache
static const size_t EntryShift = 4;
static const size_t EntryCount = 1 << EntryShift;
- TenureCount entries[EntryCount];
+ TenureCount entries[EntryCount] = {}; // zeroes
- TenureCountCache() { mozilla::PodZero(this); }
+ TenureCountCache() = default;
HashNumber hash(ObjectGroup* group) {
#if JS_BITS_PER_WORD == 32
diff --git a/js/src/gc/Statistics.h b/js/src/gc/Statistics.h
index ca1969b2c..08a2810cf 100644
--- a/js/src/gc/Statistics.h
+++ b/js/src/gc/Statistics.h
@@ -10,7 +10,6 @@
#include "mozilla/EnumeratedArray.h"
#include "mozilla/IntegerRange.h"
#include "mozilla/Maybe.h"
-#include "mozilla/PodOperations.h"
#include "jsalloc.h"
#include "jsgc.h"
@@ -112,29 +111,26 @@ enum Stat {
struct ZoneGCStats
{
/* Number of zones collected in this GC. */
- int collectedZoneCount;
+ int collectedZoneCount = 0;
/* Total number of zones in the Runtime at the start of this GC. */
- int zoneCount;
+ int zoneCount = 0;
/* Number of zones swept in this GC. */
- int sweptZoneCount;
+ int sweptZoneCount = 0;
/* Total number of compartments in all zones collected. */
- int collectedCompartmentCount;
+ int collectedCompartmentCount = 0;
/* Total number of compartments in the Runtime at the start of this GC. */
- int compartmentCount;
+ int compartmentCount = 0;
/* Total number of compartments swept by this GC. */
- int sweptCompartmentCount;
+ int sweptCompartmentCount = 0;
bool isCollectingAllZones() const { return collectedZoneCount == zoneCount; }
- ZoneGCStats()
- : collectedZoneCount(0), zoneCount(0), sweptZoneCount(0),
- collectedCompartmentCount(0), compartmentCount(0), sweptCompartmentCount(0)
- {}
+ ZoneGCStats() = default;
};
#define FOR_EACH_GC_PROFILE_TIME(_) \