зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1373209 - Use non-mutating iterator when checking tables after moving GC r=sfink
This commit is contained in:
Родитель
995284e0a4
Коммит
092c893028
|
@ -251,8 +251,8 @@ Zone::discardJitCode(FreeOp* fop, bool discardBaselineCode)
|
|||
void
|
||||
JS::Zone::checkUniqueIdTableAfterMovingGC()
|
||||
{
|
||||
for (UniqueIdMap::Enum e(uniqueIds()); !e.empty(); e.popFront())
|
||||
js::gc::CheckGCThingAfterMovingGC(e.front().key());
|
||||
for (auto r = uniqueIds().all(); !r.empty(); r.popFront())
|
||||
js::gc::CheckGCThingAfterMovingGC(r.front().key());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1907,8 +1907,8 @@ ObjectGroupCompartment::checkNewTableAfterMovingGC(NewTable* table)
|
|||
if (!table || !table->initialized())
|
||||
return;
|
||||
|
||||
for (NewTable::Enum e(*table); !e.empty(); e.popFront()) {
|
||||
NewEntry entry = e.front();
|
||||
for (auto r = table->all(); !r.empty(); r.popFront()) {
|
||||
NewEntry entry = r.front();
|
||||
CheckGCThingAfterMovingGC(entry.group.unbarrieredGet());
|
||||
TaggedProto proto = entry.group.unbarrieredGet()->proto();
|
||||
if (proto.isObject())
|
||||
|
@ -1921,7 +1921,7 @@ ObjectGroupCompartment::checkNewTableAfterMovingGC(NewTable* table)
|
|||
|
||||
NewEntry::Lookup lookup(clasp, proto, entry.associated);
|
||||
auto ptr = table->lookup(lookup);
|
||||
MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &e.front());
|
||||
MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &r.front());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1288,12 +1288,12 @@ Zone::checkBaseShapeTableAfterMovingGC()
|
|||
if (!baseShapes().initialized())
|
||||
return;
|
||||
|
||||
for (BaseShapeSet::Enum e(baseShapes()); !e.empty(); e.popFront()) {
|
||||
UnownedBaseShape* base = e.front().unbarrieredGet();
|
||||
for (auto r = baseShapes().all(); !r.empty(); r.popFront()) {
|
||||
UnownedBaseShape* base = r.front().unbarrieredGet();
|
||||
CheckGCThingAfterMovingGC(base);
|
||||
|
||||
BaseShapeSet::Ptr ptr = baseShapes().lookup(base);
|
||||
MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &e.front());
|
||||
MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &r.front());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1349,8 +1349,8 @@ Zone::checkInitialShapesTableAfterMovingGC()
|
|||
* initialShapes that points into the nursery, and that the hash table
|
||||
* entries are discoverable.
|
||||
*/
|
||||
for (InitialShapeSet::Enum e(initialShapes()); !e.empty(); e.popFront()) {
|
||||
InitialShapeEntry entry = e.front();
|
||||
for (auto r = initialShapes().all(); !r.empty(); r.popFront()) {
|
||||
InitialShapeEntry entry = r.front();
|
||||
JSProtoKey protoKey = entry.proto.key();
|
||||
TaggedProto proto = entry.proto.proto().unbarrieredGet();
|
||||
Shape* shape = entry.shape.unbarrieredGet();
|
||||
|
@ -1365,7 +1365,7 @@ Zone::checkInitialShapesTableAfterMovingGC()
|
|||
shape->numFixedSlots(),
|
||||
shape->getObjectFlags());
|
||||
InitialShapeSet::Ptr ptr = initialShapes().lookup(lookup);
|
||||
MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &e.front());
|
||||
MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &r.front());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче