Bug 1400374 - Fix compiler warning in FixGrayBits. r=smaug
The compiler complains because a postfix increment is done inside of an assert.
MozReview-Commit-ID: LSRsWMn9Tlj
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -3606,17 +3606,18 @@ nsCycleCollector::FixGrayBits(bool aForc
mCCJSRuntime->GarbageCollect(aForceGC ? JS::gcreason::SHUTDOWN_CC :
JS::gcreason::CC_FORCED);
mCCJSRuntime->FixWeakMappingGrayBits();
// It's possible that FixWeakMappingGrayBits will hit OOM when unmarking
// gray and we will have to go round again. The second time there should not
// be any weak mappings to fix up so the loop body should run at most twice.
- MOZ_RELEASE_ASSERT(count++ < 2);
+ MOZ_RELEASE_ASSERT(count < 2);
+ count++;
} while (!mCCJSRuntime->AreGCGrayBitsValid());
aTimeLog.Checkpoint("FixGrayBits");
}
bool
nsCycleCollector::IsIncrementalGCInProgress()
{