Bug 1088002 part 2. Change JS_DefineElement, JS_DefineProperty, JS_DefineUCProperty, JS_DefinePropertyById, and JS_DefineProperties to default to using JSNative accessors, not JSPropertyOp accessors. r=waldo

This commit is contained in:
Boris Zbarsky
2014-10-29 15:06:31 -04:00
parent c87c898dc9
commit 28a09cbcd7
37 changed files with 391 additions and 291 deletions

View File

@@ -180,8 +180,13 @@ WrapperAnswer::RecvDefineProperty(const ObjectId &objId, const JSIDVariant &idVa
return fail(cx, rs);
}
if (!JS_DefinePropertyById(cx, obj, id, desc.value(), desc.attributes(),
desc.getter(), desc.setter()))
if (!JS_DefinePropertyById(cx, obj, id, desc.value(),
// Descrriptors never store JSNatives for
// accessors: they have either JSFunctions or
// JSPropertyOps.
desc.attributes() | JSPROP_PROPOP_ACCESSORS,
JS_PROPERTYOP_GETTER(desc.getter()),
JS_PROPERTYOP_SETTER(desc.setter())))
{
return fail(cx, rs);
}