Backed out 7 changesets (bug 1002737) for sm-rootanalysis test failures.

CLOSED TREE

Backed out changeset ec411f0ce167 (bug 1002737)
Backed out changeset 8a63bad8faed (bug 1002737)
Backed out changeset 5afce70dad1f (bug 1002737)
Backed out changeset 6d4043272a0a (bug 1002737)
Backed out changeset ad09630ae9a3 (bug 1002737)
Backed out changeset c0dd6b9cc07a (bug 1002737)
Backed out changeset b82adb960c54 (bug 1002737)
This commit is contained in:
Ryan VanderMeulen
2014-06-03 17:07:47 -04:00
parent ff4dd90530
commit b4f9535ba7
12 changed files with 197 additions and 209 deletions

View File

@@ -268,17 +268,15 @@ js::NewPropertyDescriptorObject(JSContext *cx, Handle<PropertyDescriptor> desc,
d.initFromPropertyDescriptor(desc);
if (!d.makeObject(cx))
return false;
vp.set(d.descriptorValue());
vp.set(d.pd());
return true;
}
void
PropDesc::initFromPropertyDescriptor(Handle<PropertyDescriptor> desc)
{
MOZ_ASSERT(isUndefined());
isUndefined_ = false;
descObj_ = nullptr;
pd_.setUndefined();
attrs = uint8_t(desc.attributes());
JS_ASSERT_IF(attrs & JSPROP_READONLY, !(attrs & (JSPROP_GETTER | JSPROP_SETTER)));
if (desc.hasGetterOrSetterObject()) {
@@ -335,7 +333,7 @@ PropDesc::makeObject(JSContext *cx)
return false;
}
descObj_ = obj;
pd_.setObject(*obj);
return true;
}
@@ -435,8 +433,6 @@ HasProperty(JSContext *cx, HandleObject obj, HandleId id, MutableHandleValue vp,
bool
PropDesc::initialize(JSContext *cx, const Value &origval, bool checkAccessors)
{
MOZ_ASSERT(isUndefined());
RootedValue v(cx, origval);
/* 8.10.5 step 1 */
@@ -447,7 +443,7 @@ PropDesc::initialize(JSContext *cx, const Value &origval, bool checkAccessors)
RootedObject desc(cx, &v.toObject());
/* Make a copy of the descriptor. We might need it later. */
descObj_ = desc;
pd_ = v;
isUndefined_ = false;
@@ -539,8 +535,6 @@ PropDesc::initialize(JSContext *cx, const Value &origval, bool checkAccessors)
void
PropDesc::complete()
{
MOZ_ASSERT(!isUndefined());
if (isGenericDescriptor() || isDataDescriptor()) {
if (!hasValue_) {
hasValue_ = true;
@@ -1054,7 +1048,7 @@ js::DefineProperty(JSContext *cx, HandleObject obj, HandleId id, const PropDesc
* TrapDefineOwnProperty directly
*/
if (obj->is<ProxyObject>()) {
RootedValue pd(cx, desc.descriptorValue());
RootedValue pd(cx, desc.pd());
return Proxy::defineProperty(cx, obj, id, pd);
}
return Reject(cx, obj, JSMSG_OBJECT_NOT_EXTENSIBLE, throwError, rval);
@@ -1096,7 +1090,7 @@ js::DefineOwnProperty(JSContext *cx, HandleObject obj, HandleId id,
bool
js::ReadPropertyDescriptors(JSContext *cx, HandleObject props, bool checkAccessors,
AutoIdVector *ids, AutoPropDescVector *descs)
AutoIdVector *ids, AutoPropDescArrayRooter *descs)
{
if (!GetPropertyNames(cx, props, JSITER_OWNONLY, ids))
return false;
@@ -1104,11 +1098,11 @@ js::ReadPropertyDescriptors(JSContext *cx, HandleObject props, bool checkAccesso
RootedId id(cx);
for (size_t i = 0, len = ids->length(); i < len; i++) {
id = (*ids)[i];
Rooted<PropDesc> desc(cx);
PropDesc* desc = descs->append();
RootedValue v(cx);
if (!JSObject::getGeneric(cx, props, props, id, &v) ||
!desc.initialize(cx, v, checkAccessors) ||
!descs->append(desc))
if (!desc ||
!JSObject::getGeneric(cx, props, props, id, &v) ||
!desc->initialize(cx, v, checkAccessors))
{
return false;
}
@@ -1120,7 +1114,7 @@ bool
js::DefineProperties(JSContext *cx, HandleObject obj, HandleObject props)
{
AutoIdVector ids(cx);
AutoPropDescVector descs(cx);
AutoPropDescArrayRooter descs(cx);
if (!ReadPropertyDescriptors(cx, props, true, &ids, &descs))
return false;
@@ -1141,7 +1135,7 @@ js::DefineProperties(JSContext *cx, HandleObject obj, HandleObject props)
*/
if (obj->is<ProxyObject>()) {
for (size_t i = 0, len = ids.length(); i < len; i++) {
RootedValue pd(cx, descs[i].descriptorValue());
RootedValue pd(cx, descs[i].pd());
if (!Proxy::defineProperty(cx, obj, ids[i], pd))
return false;
}