Bug 1250134 - assert mJSRuntime when IsGrayJS() is true. r?mccr8
MozReview-Commit-ID: B5046aj61jx
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -3278,16 +3278,17 @@ nsCycleCollector::CollectWhite()
nsCycleCollectionParticipant* zoneParticipant =
hasJSRuntime ? mJSRuntime->ZoneParticipant() : nullptr;
NodePool::Enumerator etor(mGraph.mNodes);
while (!etor.IsDone()) {
PtrInfo* pinfo = etor.GetNext();
if (pinfo->mColor == white && pinfo->mParticipant) {
if (pinfo->IsGrayJS()) {
+ MOZ_ASSERT(mJSRuntime);
++numWhiteGCed;
JS::Zone* zone;
if (MOZ_UNLIKELY(pinfo->mParticipant == zoneParticipant)) {
++numWhiteJSZones;
zone = static_cast<JS::Zone*>(pinfo->mPointer);
} else {
JS::GCCellPtr ptr(pinfo->mPointer, js::GCThingTraceKind(pinfo->mPointer));
zone = JS::GetTenuredGCThingZone(ptr);