Bug 1423231 - Remove redundant BaseShape::getUnowned calls from putAccessorProperty/putDataProperty. r=bhackett

This commit is contained in:
Jan de Mooij 2017-12-07 13:24:02 +01:00
Родитель 1d4c4b18bf
Коммит f7dd1e06ab
1 изменённых файлов: 1 добавлений и 11 удалений

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

@ -794,7 +794,7 @@ js::ReshapeForAllocKind(JSContext* cx, Shape* shape, TaggedProto proto,
for (unsigned i = 0; i < ids.length(); i++) {
id = ids[i];
Rooted<UnownedBaseShape*> nbase(cx, GetBaseShapeForNewShape(cx, newShape, id));
UnownedBaseShape* nbase = GetBaseShapeForNewShape(cx, newShape, id);
if (!nbase)
return nullptr;
@ -949,11 +949,6 @@ NativeObject::putDataProperty(JSContext* cx, HandleNativeObject obj, HandleId id
} else {
// Updating the last property in a non-dictionary-mode object. Find an
// alternate shared child of the last property's previous shape.
StackBaseShape base(obj->lastProperty()->base());
UnownedBaseShape* nbase = BaseShape::getUnowned(cx, base);
if (!nbase)
return nullptr;
MOZ_ASSERT(shape == obj->lastProperty());
@ -1053,11 +1048,6 @@ NativeObject::putAccessorProperty(JSContext* cx, HandleNativeObject obj, HandleI
} else {
// Updating the last property in a non-dictionary-mode object. Find an
// alternate shared child of the last property's previous shape.
StackBaseShape base(obj->lastProperty()->base());
UnownedBaseShape* nbase = BaseShape::getUnowned(cx, base);
if (!nbase)
return nullptr;
MOZ_ASSERT(shape == obj->lastProperty());