diff --git a/js/src/gc/Verifier.cpp b/js/src/gc/Verifier.cpp index ea2b290c2d..41839bf47e 100644 --- a/js/src/gc/Verifier.cpp +++ b/js/src/gc/Verifier.cpp @@ -532,8 +532,15 @@ CheckHeapTracer::onChild(const JS::GCCellPtr& thing) return; // Don't trace into GC in zones being used by helper threads. - Zone* zone = thing.is() ? thing.as().zone() : cell->asTenured().zone(); - if (zone->group() && zone->group()->usedByHelperThread()) + Zone* zone; + if (thing.is()) + zone = thing.as().zone(); + else if (thing.is()) + zone = thing.as().zone(); + else + zone = cell->asTenured().zone(); + + if (zone->group() && zone->group()->usedByHelperThread) return; }