зеркало из https://github.com/mozilla/gecko-dev.git
Bug 687621 - Further split ObjectOps to add a third property type (and temporarily a fourth to use for a property of indeterminate type), to encapsulate object-valued jsids and properties that don't fit in the property name/element distinction. r=luke
--HG-- extra : rebase_source : 4cfd216dcbff77750cb54ea48b546e83bd555513
This commit is contained in:
Родитель
70cbcf0143
Коммит
bbb763fe0c
|
@ -2977,7 +2977,7 @@ struct JSClass {
|
|||
JSTraceOp trace;
|
||||
|
||||
JSClassInternal reserved1;
|
||||
void *reserved[26];
|
||||
void *reserved[40];
|
||||
};
|
||||
|
||||
#define JSCLASS_HAS_PRIVATE (1<<0) /* objects have private slot */
|
||||
|
|
|
@ -753,6 +753,13 @@ array_lookupElement(JSContext *cx, JSObject *obj, uint32 index, JSObject **objp,
|
|||
return true;
|
||||
}
|
||||
|
||||
static JSBool
|
||||
array_lookupSpecial(JSContext *cx, JSObject *obj, jsid id, JSObject **objp,
|
||||
JSProperty **propp)
|
||||
{
|
||||
return array_lookupProperty(cx, obj, id, objp, propp);
|
||||
}
|
||||
|
||||
JSBool
|
||||
js_GetDenseArrayElementValue(JSContext *cx, JSObject *obj, jsid id, Value *vp)
|
||||
{
|
||||
|
@ -856,6 +863,12 @@ array_getElement(JSContext *cx, JSObject *obj, JSObject *receiver, uint32 index,
|
|||
return js_NativeGet(cx, obj, obj2, shape, JSGET_METHOD_BARRIER, vp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
array_getSpecial(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp)
|
||||
{
|
||||
return array_getProperty(cx, obj, receiver, id, vp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
slowarray_addProperty(JSContext *cx, JSObject *obj, jsid id, Value *vp)
|
||||
{
|
||||
|
@ -950,6 +963,12 @@ array_setElement(JSContext *cx, JSObject *obj, uint32 index, Value *vp, JSBool s
|
|||
return js_SetPropertyHelper(cx, obj, id, 0, vp, strict);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
array_setSpecial(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict)
|
||||
{
|
||||
return array_setProperty(cx, obj, id, vp, strict);
|
||||
}
|
||||
|
||||
JSBool
|
||||
js_PrototypeHasIndexedProperties(JSContext *cx, JSObject *obj)
|
||||
{
|
||||
|
@ -1051,6 +1070,13 @@ 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,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs)
|
||||
{
|
||||
return array_defineProperty(cx, obj, id, value, getter, setter, attrs);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
array_getAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
|
@ -1066,6 +1092,12 @@ array_getElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *at
|
|||
return true;
|
||||
}
|
||||
|
||||
static JSBool
|
||||
array_getSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
return array_getAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
array_setAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
|
@ -1080,6 +1112,12 @@ array_setElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *at
|
|||
return false;
|
||||
}
|
||||
|
||||
static JSBool
|
||||
array_setSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
return array_setAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
namespace js {
|
||||
|
||||
/* non-static for direct deletion of array elements within the engine */
|
||||
|
@ -1129,6 +1167,12 @@ 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)
|
||||
{
|
||||
return array_deleteProperty(cx, obj, id, rval, strict);
|
||||
}
|
||||
|
||||
static void
|
||||
array_trace(JSTracer *trc, JSObject *obj)
|
||||
{
|
||||
|
@ -1175,20 +1219,34 @@ Class js::ArrayClass = {
|
|||
array_trace, /* trace */
|
||||
JS_NULL_CLASS_EXT,
|
||||
{
|
||||
array_lookupProperty,
|
||||
array_lookupProperty,
|
||||
array_lookupElement,
|
||||
array_lookupSpecial,
|
||||
array_defineProperty,
|
||||
array_defineProperty,
|
||||
array_defineElement,
|
||||
array_defineSpecial,
|
||||
array_getProperty,
|
||||
array_getProperty,
|
||||
array_getElement,
|
||||
array_getSpecial,
|
||||
array_setProperty,
|
||||
array_setProperty,
|
||||
array_setElement,
|
||||
array_setSpecial,
|
||||
array_getAttributes,
|
||||
array_getAttributes,
|
||||
array_getElementAttributes,
|
||||
array_getSpecialAttributes,
|
||||
array_setAttributes,
|
||||
array_setAttributes,
|
||||
array_setElementAttributes,
|
||||
array_setSpecialAttributes,
|
||||
array_deleteProperty,
|
||||
array_deleteProperty,
|
||||
array_deleteElement,
|
||||
array_deleteSpecial,
|
||||
NULL, /* enumerate */
|
||||
array_typeOf,
|
||||
array_fix,
|
||||
|
|
|
@ -54,6 +54,9 @@ class AutoIdVector;
|
|||
|
||||
/* js::Class operation signatures. */
|
||||
|
||||
typedef JSBool
|
||||
(* LookupGenericOp)(JSContext *cx, JSObject *obj, jsid id, JSObject **objp,
|
||||
JSProperty **propp);
|
||||
typedef JSBool
|
||||
(* LookupPropOp)(JSContext *cx, JSObject *obj, jsid id, JSObject **objp,
|
||||
JSProperty **propp);
|
||||
|
@ -61,27 +64,52 @@ typedef JSBool
|
|||
(* LookupElementOp)(JSContext *cx, JSObject *obj, uint32 index, JSObject **objp,
|
||||
JSProperty **propp);
|
||||
typedef JSBool
|
||||
(* LookupSpecialOp)(JSContext *cx, JSObject *obj, jsid id, JSObject **objp,
|
||||
JSProperty **propp);
|
||||
typedef JSBool
|
||||
(* DefineGenericOp)(JSContext *cx, JSObject *obj, jsid id, const Value *value,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs);
|
||||
typedef JSBool
|
||||
(* DefinePropOp)(JSContext *cx, JSObject *obj, jsid id, const Value *value,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs);
|
||||
typedef JSBool
|
||||
(* DefineElementOp)(JSContext *cx, JSObject *obj, uint32 index, const Value *value,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs);
|
||||
typedef JSBool
|
||||
(* DefineSpecialOp)(JSContext *cx, JSObject *obj, jsid id, const Value *value,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs);
|
||||
typedef JSBool
|
||||
(* GenericIdOp)(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp);
|
||||
typedef JSBool
|
||||
(* PropertyIdOp)(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp);
|
||||
typedef JSBool
|
||||
(* ElementIdOp)(JSContext *cx, JSObject *obj, JSObject *receiver, uint32 index, Value *vp);
|
||||
typedef JSBool
|
||||
(* SpecialIdOp)(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp);
|
||||
typedef JSBool
|
||||
(* StrictGenericIdOp)(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict);
|
||||
typedef JSBool
|
||||
(* StrictPropertyIdOp)(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict);
|
||||
typedef JSBool
|
||||
(* StrictElementIdOp)(JSContext *cx, JSObject *obj, uint32 index, Value *vp, JSBool strict);
|
||||
typedef JSBool
|
||||
(* StrictSpecialIdOp)(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict);
|
||||
typedef JSBool
|
||||
(* GenericAttributesOp)(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp);
|
||||
typedef JSBool
|
||||
(* AttributesOp)(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp);
|
||||
typedef JSBool
|
||||
(* ElementAttributesOp)(JSContext *cx, JSObject *obj, uint32 index, uintN *attrsp);
|
||||
typedef JSBool
|
||||
(* SpecialAttributesOp)(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp);
|
||||
typedef JSBool
|
||||
(* DeleteGenericOp)(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict);
|
||||
typedef JSBool
|
||||
(* DeleteIdOp)(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict);
|
||||
typedef JSBool
|
||||
(* DeleteElementOp)(JSContext *cx, JSObject *obj, uint32 index, Value *vp, JSBool strict);
|
||||
typedef JSBool
|
||||
(* DeleteSpecialOp)(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict);
|
||||
typedef JSType
|
||||
(* TypeOfOp)(JSContext *cx, JSObject *obj);
|
||||
|
||||
|
@ -151,20 +179,34 @@ struct ClassExtension
|
|||
|
||||
struct ObjectOps
|
||||
{
|
||||
LookupGenericOp lookupGeneric;
|
||||
LookupPropOp lookupProperty;
|
||||
LookupElementOp lookupElement;
|
||||
LookupSpecialOp lookupSpecial;
|
||||
DefineGenericOp defineGeneric;
|
||||
DefinePropOp defineProperty;
|
||||
DefineElementOp defineElement;
|
||||
DefineSpecialOp defineSpecial;
|
||||
GenericIdOp getGeneric;
|
||||
PropertyIdOp getProperty;
|
||||
ElementIdOp getElement;
|
||||
SpecialIdOp getSpecial;
|
||||
StrictGenericIdOp setGeneric;
|
||||
StrictPropertyIdOp setProperty;
|
||||
StrictElementIdOp setElement;
|
||||
StrictSpecialIdOp setSpecial;
|
||||
GenericAttributesOp getGenericAttributes;
|
||||
AttributesOp getAttributes;
|
||||
ElementAttributesOp getElementAttributes;
|
||||
SpecialAttributesOp getSpecialAttributes;
|
||||
GenericAttributesOp setGenericAttributes;
|
||||
AttributesOp setAttributes;
|
||||
ElementAttributesOp setElementAttributes;
|
||||
SpecialAttributesOp setSpecialAttributes;
|
||||
DeleteGenericOp deleteGeneric;
|
||||
DeleteIdOp deleteProperty;
|
||||
DeleteElementOp deleteElement;
|
||||
DeleteSpecialOp deleteSpecial;
|
||||
|
||||
JSNewEnumerateOp enumerate;
|
||||
TypeOfOp typeOf;
|
||||
|
@ -175,6 +217,7 @@ struct ObjectOps
|
|||
|
||||
#define JS_NULL_OBJECT_OPS \
|
||||
{NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, \
|
||||
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, \
|
||||
NULL,NULL,NULL,NULL,NULL}
|
||||
|
||||
struct Class
|
||||
|
|
|
@ -3277,6 +3277,12 @@ with_LookupElement(JSContext *cx, JSObject *obj, uint32 index, JSObject **objp,
|
|||
return with_LookupProperty(cx, obj, id, objp, propp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
with_LookupSpecial(JSContext *cx, JSObject *obj, jsid id, JSObject **objp, JSProperty **propp)
|
||||
{
|
||||
return with_LookupProperty(cx, obj, id, objp, propp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
with_GetProperty(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp)
|
||||
{
|
||||
|
@ -3292,6 +3298,12 @@ with_GetElement(JSContext *cx, JSObject *obj, JSObject *receiver, uint32 index,
|
|||
return with_GetProperty(cx, obj, receiver, id, vp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
with_GetSpecial(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp)
|
||||
{
|
||||
return with_GetProperty(cx, obj, receiver, id, vp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
with_SetProperty(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict)
|
||||
{
|
||||
|
@ -3307,6 +3319,12 @@ with_SetElement(JSContext *cx, JSObject *obj, uint32 index, Value *vp, JSBool st
|
|||
return with_SetProperty(cx, obj, id, vp, strict);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
with_SetSpecial(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict)
|
||||
{
|
||||
return with_SetProperty(cx, obj, id, vp, strict);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
with_GetAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
|
@ -3322,6 +3340,12 @@ with_GetElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *att
|
|||
return with_GetAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
with_GetSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
return with_GetAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
with_SetAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
|
@ -3337,6 +3361,12 @@ with_SetElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *att
|
|||
return with_SetAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
with_SetSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
return with_SetAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
with_DeleteProperty(JSContext *cx, JSObject *obj, jsid id, Value *rval, JSBool strict)
|
||||
{
|
||||
|
@ -3352,6 +3382,12 @@ with_DeleteElement(JSContext *cx, JSObject *obj, uint32 index, Value *rval, JSBo
|
|||
return with_DeleteProperty(cx, obj, id, rval, strict);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
with_DeleteSpecial(JSContext *cx, JSObject *obj, jsid id, Value *rval, JSBool strict)
|
||||
{
|
||||
return with_DeleteProperty(cx, obj, id, rval, strict);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
with_Enumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
|
||||
Value *statep, jsid *idp)
|
||||
|
@ -3391,20 +3427,34 @@ Class js::WithClass = {
|
|||
NULL, /* trace */
|
||||
JS_NULL_CLASS_EXT,
|
||||
{
|
||||
with_LookupProperty,
|
||||
with_LookupProperty,
|
||||
with_LookupElement,
|
||||
NULL, /* defineProperty */
|
||||
NULL, /* defineElement */
|
||||
with_LookupSpecial,
|
||||
NULL, /* defineGeneric */
|
||||
NULL, /* defineProperty */
|
||||
NULL, /* defineElement */
|
||||
NULL, /* defineSpecial */
|
||||
with_GetProperty,
|
||||
with_GetProperty,
|
||||
with_GetElement,
|
||||
with_GetSpecial,
|
||||
with_SetProperty,
|
||||
with_SetProperty,
|
||||
with_SetElement,
|
||||
with_SetSpecial,
|
||||
with_GetAttributes,
|
||||
with_GetAttributes,
|
||||
with_GetElementAttributes,
|
||||
with_GetSpecialAttributes,
|
||||
with_SetAttributes,
|
||||
with_SetAttributes,
|
||||
with_SetElementAttributes,
|
||||
with_SetSpecialAttributes,
|
||||
with_DeleteProperty,
|
||||
with_DeleteProperty,
|
||||
with_DeleteElement,
|
||||
with_DeleteSpecial,
|
||||
with_Enumerate,
|
||||
with_TypeOf,
|
||||
NULL, /* fix */
|
||||
|
|
|
@ -1441,12 +1441,11 @@ struct JSObject : js::gc::Cell {
|
|||
}
|
||||
|
||||
inline JSBool getProperty(JSContext *cx, JSObject *receiver, jsid id, js::Value *vp);
|
||||
|
||||
inline JSBool getElement(JSContext *cx, JSObject *receiver, uint32 index, js::Value *vp);
|
||||
|
||||
inline JSBool getProperty(JSContext *cx, jsid id, js::Value *vp);
|
||||
|
||||
inline JSBool getElement(JSContext *cx, uint32 index, js::Value *vp);
|
||||
inline JSBool getSpecial(JSContext *cx, jsid id, js::Value *vp);
|
||||
|
||||
JSBool setProperty(JSContext *cx, jsid id, js::Value *vp, JSBool strict) {
|
||||
if (getOps()->setProperty)
|
||||
|
|
|
@ -1125,6 +1125,12 @@ JSObject::deleteElement(JSContext *cx, uint32 index, js::Value *rval, JSBool str
|
|||
return deleteProperty(cx, id, rval, strict);
|
||||
}
|
||||
|
||||
inline JSBool
|
||||
JSObject::getSpecial(JSContext *cx, jsid id, js::Value *vp)
|
||||
{
|
||||
return getProperty(cx, id, vp);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
js_IsCallable(const js::Value &v)
|
||||
{
|
||||
|
|
|
@ -911,6 +911,12 @@ proxy_LookupElement(JSContext *cx, JSObject *obj, uint32 index, JSObject **objp,
|
|||
return proxy_LookupProperty(cx, obj, id, objp, propp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
proxy_LookupSpecial(JSContext *cx, JSObject *obj, jsid id, JSObject **objp, JSProperty **propp)
|
||||
{
|
||||
return proxy_LookupProperty(cx, obj, id, objp, propp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
proxy_DefineProperty(JSContext *cx, JSObject *obj, jsid id, const Value *value,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs)
|
||||
|
@ -937,6 +943,13 @@ proxy_DefineElement(JSContext *cx, JSObject *obj, uint32 index, const Value *val
|
|||
return proxy_DefineProperty(cx, obj, id, value, getter, setter, attrs);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
proxy_DefineSpecial(JSContext *cx, JSObject *obj, jsid id, const Value *value,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs)
|
||||
{
|
||||
return proxy_DefineProperty(cx, obj, id, value, getter, setter, attrs);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
proxy_GetProperty(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp)
|
||||
{
|
||||
|
@ -954,6 +967,12 @@ proxy_GetElement(JSContext *cx, JSObject *obj, JSObject *receiver, uint32 index,
|
|||
return proxy_GetProperty(cx, obj, receiver, id, vp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
proxy_GetSpecial(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp)
|
||||
{
|
||||
return proxy_GetProperty(cx, obj, receiver, id, vp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
proxy_SetProperty(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict)
|
||||
{
|
||||
|
@ -971,6 +990,12 @@ proxy_SetElement(JSContext *cx, JSObject *obj, uint32 index, Value *vp, JSBool s
|
|||
return proxy_SetProperty(cx, obj, id, vp, strict);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
proxy_SetSpecial(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict)
|
||||
{
|
||||
return proxy_SetProperty(cx, obj, id, vp, strict);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
proxy_GetAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
|
@ -992,6 +1017,12 @@ proxy_GetElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *at
|
|||
return proxy_GetAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
proxy_GetSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
return proxy_GetAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
proxy_SetAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
|
@ -1014,6 +1045,12 @@ proxy_SetElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *at
|
|||
return proxy_SetAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
proxy_SetSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
return proxy_SetAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
proxy_DeleteProperty(JSContext *cx, JSObject *obj, jsid id, Value *rval, JSBool strict)
|
||||
{
|
||||
|
@ -1036,6 +1073,12 @@ proxy_DeleteElement(JSContext *cx, JSObject *obj, uint32 index, Value *rval, JSB
|
|||
return proxy_DeleteProperty(cx, obj, id, rval, strict);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
proxy_DeleteSpecial(JSContext *cx, JSObject *obj, jsid id, Value *rval, JSBool strict)
|
||||
{
|
||||
return proxy_DeleteProperty(cx, obj, id, rval, strict);
|
||||
}
|
||||
|
||||
static void
|
||||
proxy_TraceObject(JSTracer *trc, JSObject *obj)
|
||||
{
|
||||
|
@ -1122,20 +1165,34 @@ JS_FRIEND_DATA(Class) js::ObjectProxyClass = {
|
|||
proxy_TraceObject, /* trace */
|
||||
JS_NULL_CLASS_EXT,
|
||||
{
|
||||
proxy_LookupProperty,
|
||||
proxy_LookupProperty,
|
||||
proxy_LookupElement,
|
||||
proxy_LookupSpecial,
|
||||
proxy_DefineProperty,
|
||||
proxy_DefineProperty,
|
||||
proxy_DefineElement,
|
||||
proxy_DefineSpecial,
|
||||
proxy_GetProperty,
|
||||
proxy_GetProperty,
|
||||
proxy_GetElement,
|
||||
proxy_GetSpecial,
|
||||
proxy_SetProperty,
|
||||
proxy_SetProperty,
|
||||
proxy_SetElement,
|
||||
proxy_SetSpecial,
|
||||
proxy_GetAttributes,
|
||||
proxy_GetAttributes,
|
||||
proxy_GetElementAttributes,
|
||||
proxy_GetSpecialAttributes,
|
||||
proxy_SetAttributes,
|
||||
proxy_SetAttributes,
|
||||
proxy_SetElementAttributes,
|
||||
proxy_SetSpecialAttributes,
|
||||
proxy_DeleteProperty,
|
||||
proxy_DeleteProperty,
|
||||
proxy_DeleteElement,
|
||||
proxy_DeleteSpecial,
|
||||
NULL, /* enumerate */
|
||||
proxy_TypeOf,
|
||||
proxy_Fix, /* fix */
|
||||
|
@ -1169,20 +1226,34 @@ JS_FRIEND_DATA(Class) js::OuterWindowProxyClass = {
|
|||
NULL /* unused */
|
||||
},
|
||||
{
|
||||
proxy_LookupProperty,
|
||||
proxy_LookupProperty,
|
||||
proxy_LookupElement,
|
||||
proxy_LookupSpecial,
|
||||
proxy_DefineProperty,
|
||||
proxy_DefineProperty,
|
||||
proxy_DefineElement,
|
||||
proxy_DefineSpecial,
|
||||
proxy_GetProperty,
|
||||
proxy_GetProperty,
|
||||
proxy_GetElement,
|
||||
proxy_GetSpecial,
|
||||
proxy_SetProperty,
|
||||
proxy_SetProperty,
|
||||
proxy_SetElement,
|
||||
proxy_SetSpecial,
|
||||
proxy_GetAttributes,
|
||||
proxy_GetAttributes,
|
||||
proxy_GetElementAttributes,
|
||||
proxy_GetSpecialAttributes,
|
||||
proxy_SetAttributes,
|
||||
proxy_SetAttributes,
|
||||
proxy_SetElementAttributes,
|
||||
proxy_SetSpecialAttributes,
|
||||
proxy_DeleteProperty,
|
||||
proxy_DeleteProperty,
|
||||
proxy_DeleteElement,
|
||||
proxy_DeleteSpecial,
|
||||
NULL, /* enumerate */
|
||||
NULL, /* typeof */
|
||||
NULL, /* fix */
|
||||
|
@ -1228,20 +1299,34 @@ JS_FRIEND_DATA(Class) js::FunctionProxyClass = {
|
|||
proxy_TraceFunction, /* trace */
|
||||
JS_NULL_CLASS_EXT,
|
||||
{
|
||||
proxy_LookupProperty,
|
||||
proxy_LookupProperty,
|
||||
proxy_LookupElement,
|
||||
proxy_LookupSpecial,
|
||||
proxy_DefineProperty,
|
||||
proxy_DefineProperty,
|
||||
proxy_DefineElement,
|
||||
proxy_DefineSpecial,
|
||||
proxy_GetProperty,
|
||||
proxy_GetProperty,
|
||||
proxy_GetElement,
|
||||
proxy_GetSpecial,
|
||||
proxy_SetProperty,
|
||||
proxy_SetProperty,
|
||||
proxy_SetElement,
|
||||
proxy_SetSpecial,
|
||||
proxy_GetAttributes,
|
||||
proxy_GetAttributes,
|
||||
proxy_GetElementAttributes,
|
||||
proxy_GetSpecialAttributes,
|
||||
proxy_SetAttributes,
|
||||
proxy_SetAttributes,
|
||||
proxy_SetElementAttributes,
|
||||
proxy_SetSpecialAttributes,
|
||||
proxy_DeleteProperty,
|
||||
proxy_DeleteProperty,
|
||||
proxy_DeleteElement,
|
||||
proxy_DeleteSpecial,
|
||||
NULL, /* enumerate */
|
||||
proxy_TypeOf,
|
||||
NULL, /* fix */
|
||||
|
|
|
@ -310,6 +310,13 @@ ArrayBuffer::obj_lookupElement(JSContext *cx, JSObject *obj, uint32 index,
|
|||
return true;
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_lookupSpecial(JSContext *cx, JSObject *obj, jsid id,
|
||||
JSObject **objp, JSProperty **propp)
|
||||
{
|
||||
return obj_lookupProperty(cx, obj, id, objp, propp);
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_defineProperty(JSContext *cx, JSObject *obj, jsid id, const Value *v,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs)
|
||||
|
@ -333,6 +340,13 @@ ArrayBuffer::obj_defineElement(JSContext *cx, JSObject *obj, uint32 index, const
|
|||
return js_DefineElement(cx, delegate, index, v, getter, setter, attrs);
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_defineSpecial(JSContext *cx, JSObject *obj, jsid id, const Value *v,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs)
|
||||
{
|
||||
return obj_defineProperty(cx, obj, id, v, getter, setter, attrs);
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_getProperty(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp)
|
||||
{
|
||||
|
@ -357,6 +371,12 @@ ArrayBuffer::obj_getElement(JSContext *cx, JSObject *obj, JSObject *receiver, ui
|
|||
return js_GetElement(cx, delegate, receiver, index, vp);
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_getSpecial(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp)
|
||||
{
|
||||
return obj_getProperty(cx, obj, receiver, id, vp);
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_setProperty(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict)
|
||||
{
|
||||
|
@ -421,6 +441,12 @@ ArrayBuffer::obj_setElement(JSContext *cx, JSObject *obj, uint32 index, Value *v
|
|||
return js_SetElementHelper(cx, delegate, index, 0, vp, strict);
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_setSpecial(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict)
|
||||
{
|
||||
return obj_setProperty(cx, obj, id, vp, strict);
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_getAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
|
@ -444,6 +470,12 @@ ArrayBuffer::obj_getElementAttributes(JSContext *cx, JSObject *obj, uint32 index
|
|||
return js_GetElementAttributes(cx, delegate, index, attrsp);
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_getSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
return obj_getAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_setAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
|
@ -468,6 +500,12 @@ ArrayBuffer::obj_setElementAttributes(JSContext *cx, JSObject *obj, uint32 index
|
|||
return js_SetElementAttributes(cx, delegate, index, attrsp);
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_setSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
return obj_setSpecialAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_deleteProperty(JSContext *cx, JSObject *obj, jsid id, Value *rval, JSBool strict)
|
||||
{
|
||||
|
@ -491,6 +529,12 @@ ArrayBuffer::obj_deleteElement(JSContext *cx, JSObject *obj, uint32 index, Value
|
|||
return js_DeleteElement(cx, delegate, index, rval, strict);
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_deleteSpecial(JSContext *cx, JSObject *obj, jsid id, Value *rval, JSBool strict)
|
||||
{
|
||||
return obj_deleteProperty(cx, obj, id, rval, strict);
|
||||
}
|
||||
|
||||
JSBool
|
||||
ArrayBuffer::obj_enumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
|
||||
Value *statep, jsid *idp)
|
||||
|
@ -649,6 +693,13 @@ TypedArray::obj_lookupElement(JSContext *cx, JSObject *obj, uint32 index,
|
|||
return true;
|
||||
}
|
||||
|
||||
JSBool
|
||||
TypedArray::obj_lookupSpecial(JSContext *cx, JSObject *obj, jsid id,
|
||||
JSObject **objp, JSProperty **propp)
|
||||
{
|
||||
return obj_lookupProperty(cx, obj, id, objp, propp);
|
||||
}
|
||||
|
||||
JSBool
|
||||
TypedArray::obj_getAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
|
@ -665,6 +716,12 @@ TypedArray::obj_getElementAttributes(JSContext *cx, JSObject *obj, uint32 index,
|
|||
return true;
|
||||
}
|
||||
|
||||
JSBool
|
||||
TypedArray::obj_getSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
return obj_getAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
JSBool
|
||||
TypedArray::obj_setAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
|
@ -679,6 +736,12 @@ TypedArray::obj_setElementAttributes(JSContext *cx, JSObject *obj, uint32 index,
|
|||
return false;
|
||||
}
|
||||
|
||||
JSBool
|
||||
TypedArray::obj_setSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
return obj_setAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
/* static */ int
|
||||
TypedArray::lengthOffset()
|
||||
{
|
||||
|
@ -936,6 +999,12 @@ class TypedArrayTemplate
|
|||
return js_NativeGet(cx, obj, obj2, shape, JSGET_METHOD_BARRIER, vp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
obj_getSpecial(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp)
|
||||
{
|
||||
return obj_getProperty(cx, obj, receiver, id, vp);
|
||||
}
|
||||
|
||||
static bool
|
||||
setElementTail(JSContext *cx, JSObject *tarray, uint32 index, Value *vp, JSBool strict)
|
||||
{
|
||||
|
@ -1035,6 +1104,12 @@ class TypedArrayTemplate
|
|||
return setElementTail(cx, tarray, index, vp, strict);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
obj_setSpecial(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict)
|
||||
{
|
||||
return obj_setProperty(cx, obj, id, vp, strict);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
obj_defineProperty(JSContext *cx, JSObject *obj, jsid id, const Value *v,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs)
|
||||
|
@ -1054,6 +1129,13 @@ class TypedArrayTemplate
|
|||
return obj_setElement(cx, obj, index, &tmp, false);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
obj_defineSpecial(JSContext *cx, JSObject *obj, jsid id, const Value *v,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs)
|
||||
{
|
||||
return obj_defineProperty(cx, obj, id, v, getter, setter, attrs);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
obj_deleteProperty(JSContext *cx, JSObject *obj, jsid id, Value *rval, JSBool strict)
|
||||
{
|
||||
|
@ -1089,6 +1171,12 @@ class TypedArrayTemplate
|
|||
return true;
|
||||
}
|
||||
|
||||
static JSBool
|
||||
obj_deleteSpecial(JSContext *cx, JSObject *obj, jsid id, Value *rval, JSBool strict)
|
||||
{
|
||||
return obj_deleteProperty(cx, obj, id, rval, strict);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
obj_enumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
|
||||
Value *statep, jsid *idp)
|
||||
|
@ -1921,20 +2009,34 @@ Class js::ArrayBufferClass = {
|
|||
ArrayBuffer::obj_trace,
|
||||
JS_NULL_CLASS_EXT,
|
||||
{
|
||||
ArrayBuffer::obj_lookupProperty,
|
||||
ArrayBuffer::obj_lookupProperty,
|
||||
ArrayBuffer::obj_lookupElement,
|
||||
ArrayBuffer::obj_lookupSpecial,
|
||||
ArrayBuffer::obj_defineProperty,
|
||||
ArrayBuffer::obj_defineProperty,
|
||||
ArrayBuffer::obj_defineElement,
|
||||
ArrayBuffer::obj_defineSpecial,
|
||||
ArrayBuffer::obj_getProperty,
|
||||
ArrayBuffer::obj_getProperty,
|
||||
ArrayBuffer::obj_getElement,
|
||||
ArrayBuffer::obj_getSpecial,
|
||||
ArrayBuffer::obj_setProperty,
|
||||
ArrayBuffer::obj_setProperty,
|
||||
ArrayBuffer::obj_setElement,
|
||||
ArrayBuffer::obj_setSpecial,
|
||||
ArrayBuffer::obj_getAttributes,
|
||||
ArrayBuffer::obj_getAttributes,
|
||||
ArrayBuffer::obj_getElementAttributes,
|
||||
ArrayBuffer::obj_getSpecialAttributes,
|
||||
ArrayBuffer::obj_setAttributes,
|
||||
ArrayBuffer::obj_setAttributes,
|
||||
ArrayBuffer::obj_setElementAttributes,
|
||||
ArrayBuffer::obj_setSpecialAttributes,
|
||||
ArrayBuffer::obj_deleteProperty,
|
||||
ArrayBuffer::obj_deleteProperty,
|
||||
ArrayBuffer::obj_deleteElement,
|
||||
ArrayBuffer::obj_deleteSpecial,
|
||||
ArrayBuffer::obj_enumerate,
|
||||
ArrayBuffer::obj_typeOf,
|
||||
NULL, /* thisObject */
|
||||
|
@ -2019,20 +2121,34 @@ JSFunctionSpec _typedArray::jsfuncs[] = { \
|
|||
_typedArray::obj_trace, /* trace */ \
|
||||
JS_NULL_CLASS_EXT, \
|
||||
{ \
|
||||
_typedArray::obj_lookupProperty, \
|
||||
_typedArray::obj_lookupProperty, \
|
||||
_typedArray::obj_lookupElement, \
|
||||
_typedArray::obj_lookupSpecial, \
|
||||
_typedArray::obj_defineProperty, \
|
||||
_typedArray::obj_defineProperty, \
|
||||
_typedArray::obj_defineElement, \
|
||||
_typedArray::obj_defineSpecial, \
|
||||
_typedArray::obj_getProperty, \
|
||||
_typedArray::obj_getProperty, \
|
||||
_typedArray::obj_getElement, \
|
||||
_typedArray::obj_getSpecial, \
|
||||
_typedArray::obj_setProperty, \
|
||||
_typedArray::obj_setProperty, \
|
||||
_typedArray::obj_setElement, \
|
||||
_typedArray::obj_setSpecial, \
|
||||
_typedArray::obj_getAttributes, \
|
||||
_typedArray::obj_getAttributes, \
|
||||
_typedArray::obj_getElementAttributes, \
|
||||
_typedArray::obj_getSpecialAttributes, \
|
||||
_typedArray::obj_setAttributes, \
|
||||
_typedArray::obj_setAttributes, \
|
||||
_typedArray::obj_setElementAttributes, \
|
||||
_typedArray::obj_setSpecialAttributes, \
|
||||
_typedArray::obj_deleteProperty, \
|
||||
_typedArray::obj_deleteProperty, \
|
||||
_typedArray::obj_deleteElement, \
|
||||
_typedArray::obj_deleteSpecial, \
|
||||
_typedArray::obj_enumerate, \
|
||||
_typedArray::obj_typeOf, \
|
||||
NULL, /* thisObject */ \
|
||||
|
|
|
@ -82,6 +82,9 @@ struct JS_FRIEND_API(ArrayBuffer) {
|
|||
obj_lookupElement(JSContext *cx, JSObject *obj, uint32 index,
|
||||
JSObject **objp, JSProperty **propp);
|
||||
|
||||
static JSBool
|
||||
obj_lookupSpecial(JSContext *cx, JSObject *obj, jsid id, JSObject **objp, JSProperty **propp);
|
||||
|
||||
static JSBool
|
||||
obj_defineProperty(JSContext *cx, JSObject *obj, jsid id, const Value *v,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs);
|
||||
|
@ -90,36 +93,55 @@ struct JS_FRIEND_API(ArrayBuffer) {
|
|||
obj_defineElement(JSContext *cx, JSObject *obj, uint32 index, const Value *v,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs);
|
||||
|
||||
static JSBool
|
||||
obj_defineSpecial(JSContext *cx, JSObject *obj, jsid id, const Value *v,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs);
|
||||
|
||||
static JSBool
|
||||
obj_getProperty(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp);
|
||||
|
||||
static JSBool
|
||||
obj_getElement(JSContext *cx, JSObject *obj, JSObject *receiver, uint32 index, Value *vp);
|
||||
|
||||
static JSBool
|
||||
obj_getSpecial(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp);
|
||||
|
||||
static JSBool
|
||||
obj_setProperty(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict);
|
||||
|
||||
static JSBool
|
||||
obj_setElement(JSContext *cx, JSObject *obj, uint32 index, Value *vp, JSBool strict);
|
||||
|
||||
static JSBool
|
||||
obj_setSpecial(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict);
|
||||
|
||||
static JSBool
|
||||
obj_getAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp);
|
||||
|
||||
static JSBool
|
||||
obj_getElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *attrsp);
|
||||
|
||||
static JSBool
|
||||
obj_getSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp);
|
||||
|
||||
static JSBool
|
||||
obj_setAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp);
|
||||
|
||||
static JSBool
|
||||
obj_setElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *attrsp);
|
||||
|
||||
static JSBool
|
||||
obj_setSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp);
|
||||
|
||||
static JSBool
|
||||
obj_deleteProperty(JSContext *cx, JSObject *obj, jsid id, Value *rval, JSBool strict);
|
||||
|
||||
static JSBool
|
||||
obj_deleteElement(JSContext *cx, JSObject *obj, uint32 index, Value *rval, JSBool strict);
|
||||
|
||||
static JSBool
|
||||
obj_deleteSpecial(JSContext *cx, JSObject *obj, jsid id, Value *rval, JSBool strict);
|
||||
|
||||
static JSBool
|
||||
obj_enumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
|
||||
Value *statep, jsid *idp);
|
||||
|
@ -189,12 +211,16 @@ struct JS_FRIEND_API(TypedArray) {
|
|||
JSObject **objp, JSProperty **propp);
|
||||
static JSBool obj_lookupElement(JSContext *cx, JSObject *obj, uint32 index,
|
||||
JSObject **objp, JSProperty **propp);
|
||||
static JSBool obj_lookupSpecial(JSContext *cx, JSObject *obj, jsid id,
|
||||
JSObject **objp, JSProperty **propp);
|
||||
|
||||
static JSBool obj_getAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp);
|
||||
static JSBool obj_getElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *attrsp);
|
||||
static JSBool obj_getSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp);
|
||||
|
||||
static JSBool obj_setAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp);
|
||||
static JSBool obj_setElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *attrsp);
|
||||
static JSBool obj_setSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp);
|
||||
|
||||
static JSUint32 getLength(JSObject *obj);
|
||||
static JSUint32 getByteOffset(JSObject *obj);
|
||||
|
|
|
@ -4753,6 +4753,12 @@ xml_lookupElement(JSContext *cx, JSObject *obj, uint32 index, JSObject **objp,
|
|||
return true;
|
||||
}
|
||||
|
||||
static JSBool
|
||||
xml_lookupSpecial(JSContext *cx, JSObject *obj, jsid id, JSObject **objp, JSProperty **propp)
|
||||
{
|
||||
return xml_lookupProperty(cx, obj, id, objp, propp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
xml_defineProperty(JSContext *cx, JSObject *obj, jsid id, const Value *v,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs)
|
||||
|
@ -4777,6 +4783,13 @@ xml_defineElement(JSContext *cx, JSObject *obj, uint32 index, const Value *v,
|
|||
return xml_defineProperty(cx, obj, id, v, getter, setter, attrs);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
xml_defineSpecial(JSContext *cx, JSObject *obj, jsid id, const Value *v,
|
||||
PropertyOp getter, StrictPropertyOp setter, uintN attrs)
|
||||
{
|
||||
return xml_defineProperty(cx, obj, id, v, getter, setter, attrs);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
xml_getProperty(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp)
|
||||
{
|
||||
|
@ -4797,6 +4810,12 @@ xml_getElement(JSContext *cx, JSObject *obj, JSObject *receiver, uint32 index, V
|
|||
return xml_getProperty(cx, obj, receiver, id, vp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
xml_getSpecial(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp)
|
||||
{
|
||||
return xml_getProperty(cx, obj, receiver, id, vp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
xml_setProperty(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict)
|
||||
{
|
||||
|
@ -4812,6 +4831,12 @@ xml_setElement(JSContext *cx, JSObject *obj, uint32 index, Value *vp, JSBool str
|
|||
return xml_setProperty(cx, obj, id, vp, strict);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
xml_setSpecial(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict)
|
||||
{
|
||||
return xml_setProperty(cx, obj, id, vp, strict);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
xml_getAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
|
@ -4832,6 +4857,12 @@ xml_getElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *attr
|
|||
return xml_getAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
xml_getSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
return xml_getAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
xml_setAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
|
@ -4856,6 +4887,12 @@ xml_setElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *attr
|
|||
return xml_setAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
xml_setSpecialAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
return xml_setAttributes(cx, obj, id, attrsp);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
xml_deleteProperty(JSContext *cx, JSObject *obj, jsid id, Value *rval, JSBool strict)
|
||||
{
|
||||
|
@ -4928,6 +4965,12 @@ xml_deleteElement(JSContext *cx, JSObject *obj, uint32 index, Value *rval, JSBoo
|
|||
return true;
|
||||
}
|
||||
|
||||
static JSBool
|
||||
xml_deleteSpecial(JSContext *cx, JSObject *obj, jsid id, Value *rval, JSBool strict)
|
||||
{
|
||||
return xml_deleteProperty(cx, obj, id, rval, strict);
|
||||
}
|
||||
|
||||
static JSString *
|
||||
xml_toString_helper(JSContext *cx, JSXML *xml);
|
||||
|
||||
|
@ -5226,20 +5269,34 @@ JS_FRIEND_DATA(Class) js::XMLClass = {
|
|||
xml_trace,
|
||||
JS_NULL_CLASS_EXT,
|
||||
{
|
||||
xml_lookupProperty,
|
||||
xml_lookupProperty,
|
||||
xml_lookupElement,
|
||||
xml_lookupSpecial,
|
||||
xml_defineProperty,
|
||||
xml_defineProperty,
|
||||
xml_defineElement,
|
||||
xml_defineSpecial,
|
||||
xml_getProperty,
|
||||
xml_getProperty,
|
||||
xml_getElement,
|
||||
xml_getSpecial,
|
||||
xml_setProperty,
|
||||
xml_setProperty,
|
||||
xml_setElement,
|
||||
xml_setSpecial,
|
||||
xml_getAttributes,
|
||||
xml_getAttributes,
|
||||
xml_getElementAttributes,
|
||||
xml_getSpecialAttributes,
|
||||
xml_setAttributes,
|
||||
xml_setAttributes,
|
||||
xml_setElementAttributes,
|
||||
xml_setSpecialAttributes,
|
||||
xml_deleteProperty,
|
||||
xml_deleteProperty,
|
||||
xml_deleteElement,
|
||||
xml_deleteSpecial,
|
||||
xml_enumerate,
|
||||
xml_typeOf,
|
||||
xml_fix,
|
||||
|
|
|
@ -1388,20 +1388,34 @@ XPC_WN_JSOp_ThisObject(JSContext *cx, JSObject *obj);
|
|||
// Macros to initialize Object or Function like XPC_WN classes
|
||||
#define XPC_WN_WithCall_ObjectOps \
|
||||
{ \
|
||||
nsnull, /* lookupGeneric */ \
|
||||
nsnull, /* lookupProperty */ \
|
||||
nsnull, /* lookupElement */ \
|
||||
nsnull, /* lookupSpecial */ \
|
||||
nsnull, /* defineGeneric */ \
|
||||
nsnull, /* defineProperty */ \
|
||||
nsnull, /* defineElement */ \
|
||||
nsnull, /* defineSpecial */ \
|
||||
nsnull, /* getGeneric */ \
|
||||
nsnull, /* getProperty */ \
|
||||
nsnull, /* getElement */ \
|
||||
nsnull, /* getSpecial */ \
|
||||
nsnull, /* setGeneric */ \
|
||||
nsnull, /* setProperty */ \
|
||||
nsnull, /* setElement */ \
|
||||
nsnull, /* setSpecial */ \
|
||||
nsnull, /* getGenericAttributes */ \
|
||||
nsnull, /* getAttributes */ \
|
||||
nsnull, /* getElementAttributes */ \
|
||||
nsnull, /* getSpecialAttributes */ \
|
||||
nsnull, /* setGenericAttributes */ \
|
||||
nsnull, /* setAttributes */ \
|
||||
nsnull, /* setElementAttributes */ \
|
||||
nsnull, /* setSpecialAttributes */ \
|
||||
nsnull, /* deleteGeneric */ \
|
||||
nsnull, /* deleteProperty */ \
|
||||
nsnull, /* deleteElement */ \
|
||||
nsnull, /* deleteSpecial */ \
|
||||
XPC_WN_JSOp_Enumerate, \
|
||||
XPC_WN_JSOp_TypeOf_Function, \
|
||||
nsnull, /* fix */ \
|
||||
|
@ -1411,20 +1425,34 @@ XPC_WN_JSOp_ThisObject(JSContext *cx, JSObject *obj);
|
|||
|
||||
#define XPC_WN_NoCall_ObjectOps \
|
||||
{ \
|
||||
nsnull, /* lookupGeneric */ \
|
||||
nsnull, /* lookupProperty */ \
|
||||
nsnull, /* lookupElement */ \
|
||||
nsnull, /* lookupSpecial */ \
|
||||
nsnull, /* defineGeneric */ \
|
||||
nsnull, /* defineProperty */ \
|
||||
nsnull, /* defineElement */ \
|
||||
nsnull, /* defineSpecial */ \
|
||||
nsnull, /* getGeneric */ \
|
||||
nsnull, /* getProperty */ \
|
||||
nsnull, /* getElement */ \
|
||||
nsnull, /* getSpecial */ \
|
||||
nsnull, /* setGeneric */ \
|
||||
nsnull, /* setProperty */ \
|
||||
nsnull, /* setElement */ \
|
||||
nsnull, /* setSpecial */ \
|
||||
nsnull, /* getGenericAttributes */ \
|
||||
nsnull, /* getAttributes */ \
|
||||
nsnull, /* getElementAttributes */ \
|
||||
nsnull, /* getSpecialAttributes */ \
|
||||
nsnull, /* setGenericAttributes */ \
|
||||
nsnull, /* setAttributes */ \
|
||||
nsnull, /* setElementAttributes */ \
|
||||
nsnull, /* setSpecialAttributes */ \
|
||||
nsnull, /* deleteGeneric */ \
|
||||
nsnull, /* deleteProperty */ \
|
||||
nsnull, /* deleteElement */ \
|
||||
nsnull, /* deleteSpecial */ \
|
||||
XPC_WN_JSOp_Enumerate, \
|
||||
XPC_WN_JSOp_TypeOf_Object, \
|
||||
nsnull, /* fix */ \
|
||||
|
|
|
@ -906,20 +906,34 @@ js::Class XPC_WN_NoHelper_JSClass = {
|
|||
|
||||
// ObjectOps
|
||||
{
|
||||
nsnull, // lookupGeneric
|
||||
nsnull, // lookupProperty
|
||||
nsnull, // lookupElement
|
||||
nsnull, // lookupSpecial
|
||||
nsnull, // defineGeneric
|
||||
nsnull, // defineProperty
|
||||
nsnull, // defineElement
|
||||
nsnull, // defineSpecial
|
||||
nsnull, // getGeneric
|
||||
nsnull, // getProperty
|
||||
nsnull, // getElement
|
||||
nsnull, // getSpecial
|
||||
nsnull, // setGeneric
|
||||
nsnull, // setProperty
|
||||
nsnull, // setElement
|
||||
nsnull, // setSpecial
|
||||
nsnull, // getGenericAttributes
|
||||
nsnull, // getAttributes
|
||||
nsnull, // getElementAttributes
|
||||
nsnull, // getSpecialAttributes
|
||||
nsnull, // setGenericAttributes
|
||||
nsnull, // setAttributes
|
||||
nsnull, // setElementAttributes
|
||||
nsnull, // setSpecialAttributes
|
||||
nsnull, // deleteGeneric
|
||||
nsnull, // deleteProperty
|
||||
nsnull, // deleteElement
|
||||
nsnull, // deleteSpecial
|
||||
XPC_WN_JSOp_Enumerate,
|
||||
XPC_WN_JSOp_TypeOf_Object,
|
||||
nsnull, // fix
|
||||
|
|
Загрузка…
Ссылка в новой задаче