Bug 908484 - Fix canCollect() exception in JS engine (r=bhackett)

This commit is contained in:
Bill McCloskey 2013-08-23 10:23:40 -07:00
parent ac5ab842c2
commit 48f8497332
2 changed files with 3 additions and 11 deletions

View File

@ -195,9 +195,6 @@ struct Zone : private JS::shadow::Zone,
void scheduleGC() {
JS_ASSERT(!runtimeFromMainThread()->isHeapBusy());
// Ignore attempts to schedule GCs on zones which can't be collected.
if (canCollect())
gcScheduled = true;
}
@ -205,8 +202,8 @@ struct Zone : private JS::shadow::Zone,
gcScheduled = false;
}
bool isGCScheduled() const {
return gcScheduled;
bool isGCScheduled() {
return gcScheduled && canCollect();
}
void setPreservingCode(bool preserving) {

View File

@ -4445,11 +4445,6 @@ GCCycle(JSRuntime *rt, bool incremental, int64_t budget, JSGCInvocationKind gcki
/* If we attempt to invoke the GC while we are running in the GC, assert. */
JS_ASSERT(!rt->isHeapBusy());
#ifdef DEBUG
for (ZonesIter zone(rt); !zone.done(); zone.next())
JS_ASSERT_IF(rt->gcMode == JSGC_MODE_GLOBAL, zone->isGCScheduled());
#endif
AutoGCSession gcsession(rt);
/*