Bug 1186626 - Part 4: Convert ShapeVectors in jsobj.cpp; r=jonco

--HG--
extra : rebase_source : cc53efca03136ddf3486bda6d750aa6c8cf6e709
This commit is contained in:
Terrence Cole 2015-07-23 08:19:08 -07:00
Родитель 225917115e
Коммит f991f40d10
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -520,15 +520,15 @@ js::SetIntegrityLevel(JSContext* cx, HandleObject obj, IntegrityLevel level)
return false;
// Get an in-order list of the shapes in this object.
AutoShapeVector shapes(cx);
Rooted<ShapeVector> shapes(cx, ShapeVector(cx));
for (Shape::Range<NoGC> r(nobj->lastProperty()); !r.empty(); r.popFront()) {
if (!shapes.append(&r.front()))
return false;
}
Reverse(shapes.begin(), shapes.end());
for (size_t i = 0; i < shapes.length(); i++) {
StackShape unrootedChild(shapes[i]);
for (Shape* shape : shapes) {
StackShape unrootedChild(shape);
RootedGeneric<StackShape*> child(cx, &unrootedChild);
child->attrs |= GetSealedOrFrozenAttributes(child->attrs, level);
@ -1351,15 +1351,15 @@ InitializePropertiesFromCompatibleNativeObject(JSContext* cx,
return false;
// Get an in-order list of the shapes in the src object.
AutoShapeVector shapes(cx);
Rooted<ShapeVector> shapes(cx, ShapeVector(cx));
for (Shape::Range<NoGC> r(src->lastProperty()); !r.empty(); r.popFront()) {
if (!shapes.append(&r.front()))
return false;
}
Reverse(shapes.begin(), shapes.end());
for (size_t i = 0; i < shapes.length(); i++) {
StackShape unrootedChild(shapes[i]);
for (Shape* shape : shapes) {
StackShape unrootedChild(shape);
RootedGeneric<StackShape*> child(cx, &unrootedChild);
shape = cx->compartment()->propertyTree.getChild(cx, shape, *child);
if (!shape)