Bug 924608 - Fix a compiler warning in memorymetrics; r=njn
authorTerrence Cole <terrence@mozilla.com>
Tue, 08 Oct 2013 14:15:59 -0700
changeset 164346 c3d14caa839ac76b0d1f8b0d6687e28b486f7617
parent 164345 6088d4495e46de48b591e6a4c09c42b55bc3525d
child 164347 35167e0cc3193e0f7ed90fe1a34f5350a58fd280
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs924608
milestone27.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 924608 - Fix a compiler warning in memorymetrics; r=njn
js/public/MemoryMetrics.h
--- a/js/public/MemoryMetrics.h
+++ b/js/public/MemoryMetrics.h
@@ -56,22 +56,22 @@ struct InefficientNonFlatteningStringHas
 //
 // In some classes, one or more of the macro arguments aren't used.  We use '_'
 // for those.
 //
 #define DECL_SIZE(gc, mSize)                      size_t mSize;
 #define ZERO_SIZE(gc, mSize)                      mSize(0),
 #define COPY_OTHER_SIZE(gc, mSize)                mSize(other.mSize),
 #define ADD_OTHER_SIZE(gc, mSize)                 mSize += other.mSize;
-#define ADD_SIZE_TO_N_IF_LIVE_GC_THING(gc, mSize) n += (gc == js::IsLiveGCThing) ? mSize : 0;
+#define ADD_SIZE_TO_N_IF_LIVE_GC_THING(gc, mSize) n += (gc) ? mSize : 0;
 
 // Used to annotate which size_t fields measure live GC things and which don't.
 enum {
-    IsLiveGCThing,
-    NotLiveGCThing
+    NotLiveGCThing = false,
+    IsLiveGCThing = true
 };
 
 struct ZoneStatsPod
 {
 #define FOR_EACH_SIZE(macro) \
     macro(NotLiveGCThing, gcHeapArenaAdmin) \
     macro(NotLiveGCThing, unusedGCThings) \
     macro(IsLiveGCThing,  lazyScriptsGCHeap) \