diff --git a/js/src/gc/Marking.cpp b/js/src/gc/Marking.cpp index 3ad3c9d3c406..b71e39a367c9 100644 --- a/js/src/gc/Marking.cpp +++ b/js/src/gc/Marking.cpp @@ -358,10 +358,11 @@ IsAboutToBeFinalized(T **thingp) * We should return false for things that have been allocated during * incremental sweeping, but this possibility doesn't occur at the moment * because this function is only called at the very start of the sweeping a - * compartment group. Rather than do the extra check, we just assert that - * it's not necessary. + * compartment group and during minor gc. Rather than do the extra check, + * we just assert that it's not necessary. */ - JS_ASSERT(!(*thingp)->arenaHeader()->allocatedDuringIncremental); + JS_ASSERT_IF(!(*thingp)->runtimeFromAnyThread()->isHeapMinorCollecting(), + !(*thingp)->arenaHeader()->allocatedDuringIncremental); return !(*thingp)->isMarked(); }