Bug 817343 - Ensure that incremental GC validation happens (r=jonco)

This commit is contained in:
Bill McCloskey
2012-12-03 12:17:23 -08:00
parent 9c53fae0e7
commit 4a47ca7307
3 changed files with 62 additions and 70 deletions

View File

@@ -76,30 +76,6 @@ WeakMapBase::resetCompartmentWeakMapList(JSCompartment *c)
}
}
bool
WeakMapBase::saveCompartmentWeakMapList(JSCompartment *c, WeakMapVector &vector)
{
WeakMapBase *m = c->gcWeakMapList;
while (m) {
if (!vector.append(m))
return false;
m = m->next;
}
return true;
}
void
WeakMapBase::restoreCompartmentWeakMapLists(WeakMapVector &vector)
{
for (WeakMapBase **p = vector.begin(); p != vector.end(); p++) {
WeakMapBase *m = *p;
JS_ASSERT(m->next == WeakMapNotInList);
JSCompartment *c = m->compartment;
m->next = c->gcWeakMapList;
c->gcWeakMapList = m;
}
}
void
WeakMapBase::removeWeakMapFromList(WeakMapBase *weakmap)
{