Bug 986147 - Loosen assertions to allow IsAboutToBeFinalized to be used during MinorGC; r=sfink

This commit is contained in:
Terrence Cole 2014-03-20 14:38:43 -07:00
parent b44fa4bf74
commit a375bd024e

View File

@ -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();
}