bool WeakMapBase::saveCompartmentWeakMapList(JSCompartment *c, WeakMapVector &vector) { WeakMapBase *m = c->gcWeakMapList; while (m) { if (!vector.append(m)) return false; m = m->next; } return true; }
bool WeakMapBase::saveWeakMapList(JSRuntime *rt, WeakMapVector &vector) { WeakMapBase *m = rt->gcWeakMapList; while (m) { if (!vector.append(m)) return false; m = m->next; } return true; }