Backed out changeset 64ec5c15d182 (bug 1107496) for SM(ggc) orange.

This commit is contained in:
Ryan VanderMeulen
2014-12-05 13:28:40 -05:00
parent 2dce5998e1
commit 11d669cc74
65 changed files with 482 additions and 481 deletions

View File

@@ -484,17 +484,21 @@ NewPropertyIteratorObject(JSContext *cx, unsigned flags)
if (!shape)
return nullptr;
JSObject *obj = JSObject::create(cx, ITERATOR_FINALIZE_KIND,
GetInitialHeap(GenericObject, clasp), shape, type);
NativeObject *obj =
MaybeNativeObject(JSObject::create(cx, ITERATOR_FINALIZE_KIND,
GetInitialHeap(GenericObject, clasp), shape, type));
if (!obj)
return nullptr;
PropertyIteratorObject *res = &obj->as<PropertyIteratorObject>();
MOZ_ASSERT(res->numFixedSlots() == JSObject::ITER_CLASS_NFIXED_SLOTS);
return res;
MOZ_ASSERT(obj->numFixedSlots() == JSObject::ITER_CLASS_NFIXED_SLOTS);
return &obj->as<PropertyIteratorObject>();
}
return NewBuiltinClassInstance<PropertyIteratorObject>(cx);
JSObject *obj = NewBuiltinClassInstance(cx, &PropertyIteratorObject::class_);
if (!obj)
return nullptr;
return &obj->as<PropertyIteratorObject>();
}
NativeIterator *
@@ -805,7 +809,7 @@ js::CreateItrResultObject(JSContext *cx, HandleValue value, bool done)
if (!proto)
return nullptr;
RootedPlainObject obj(cx, NewObjectWithGivenProto<PlainObject>(cx, proto, cx->global()));
RootedObject obj(cx, NewObjectWithGivenProto(cx, &JSObject::class_, proto, cx->global()));
if (!obj)
return nullptr;