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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user