Bug 687621 - Introduce js::SpecialId, encapsulating the non-index, non-string bizarro property names. r=luke
This commit is contained in:
@@ -754,10 +754,10 @@ array_lookupElement(JSContext *cx, JSObject *obj, uint32 index, JSObject **objp,
|
||||
}
|
||||
|
||||
static JSBool
|
||||
array_lookupSpecial(JSContext *cx, JSObject *obj, jsid id, JSObject **objp,
|
||||
array_lookupSpecial(JSContext *cx, JSObject *obj, SpecialId sid, JSObject **objp,
|
||||
JSProperty **propp)
|
||||
{
|
||||
return array_lookupProperty(cx, obj, id, objp, propp);
|
||||
return array_lookupProperty(cx, obj, SPECIALID_TO_JSID(sid), objp, propp);
|
||||
}
|
||||
|
||||
JSBool
|
||||
@@ -864,9 +864,9 @@ array_getElement(JSContext *cx, JSObject *obj, JSObject *receiver, uint32 index,
|
||||
}
|
||||
|
||||
static JSBool
|
||||
array_getSpecial(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp)
|
||||
array_getSpecial(JSContext *cx, JSObject *obj, JSObject *receiver, SpecialId sid, Value *vp)
|
||||
{
|
||||
return array_getProperty(cx, obj, receiver, id, vp);
|
||||
return array_getProperty(cx, obj, receiver, SPECIALID_TO_JSID(sid), vp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
@@ -964,9 +964,9 @@ array_setElement(JSContext *cx, JSObject *obj, uint32 index, Value *vp, JSBool s
|
||||
}
|
||||
|
||||
static JSBool
|
||||
array_setSpecial(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict)
|
||||
array_setSpecial(JSContext *cx, JSObject *obj, SpecialId sid, Value *vp, JSBool strict)
|
||||
{
|
||||
return array_setProperty(cx, obj, id, vp, strict);
|
||||
return array_setProperty(cx, obj, SPECIALID_TO_JSID(sid), vp, strict);
|
||||
}
|
||||
|
||||
JSBool
|
||||
@@ -1071,10 +1071,10 @@ array_defineElement(JSContext *cx, JSObject *obj, uint32 index, const Value *val
|
||||
} // namespace js
|
||||
|
||||
static JSBool
|
||||
array_defineSpecial(JSContext *cx, JSObject *obj, jsid id, const Value *value,
|
||||
array_defineSpecial(JSContext *cx, JSObject *obj, SpecialId sid, const Value *value,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs)
|
||||
{
|
||||
return array_defineProperty(cx, obj, id, value, getter, setter, attrs);
|
||||
return array_defineProperty(cx, obj, SPECIALID_TO_JSID(sid), value, getter, setter, attrs);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
@@ -1093,9 +1093,9 @@ array_getElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *at
|
||||
}
|
||||
|
||||
static JSBool
|
||||
array_getSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
array_getSpecialAttributes(JSContext *cx, JSObject *obj, SpecialId sid, uintN *attrsp)
|
||||
{
|
||||
return array_getAttributes(cx, obj, id, attrsp);
|
||||
return array_getAttributes(cx, obj, SPECIALID_TO_JSID(sid), attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
@@ -1113,9 +1113,9 @@ array_setElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *at
|
||||
}
|
||||
|
||||
static JSBool
|
||||
array_setSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
array_setSpecialAttributes(JSContext *cx, JSObject *obj, SpecialId sid, uintN *attrsp)
|
||||
{
|
||||
return array_setAttributes(cx, obj, id, attrsp);
|
||||
return array_setAttributes(cx, obj, SPECIALID_TO_JSID(sid), attrsp);
|
||||
}
|
||||
|
||||
namespace js {
|
||||
@@ -1168,9 +1168,9 @@ array_deleteElement(JSContext *cx, JSObject *obj, uint32 index, Value *rval, JSB
|
||||
} // namespace js
|
||||
|
||||
static JSBool
|
||||
array_deleteSpecial(JSContext *cx, JSObject *obj, jsid id, Value *rval, JSBool strict)
|
||||
array_deleteSpecial(JSContext *cx, JSObject *obj, SpecialId sid, Value *rval, JSBool strict)
|
||||
{
|
||||
return array_deleteProperty(cx, obj, id, rval, strict);
|
||||
return array_deleteProperty(cx, obj, SPECIALID_TO_JSID(sid), rval, strict);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user