Bug 580128 - Small cleanups in XrayWrapper and first stab at enumeration. r=mrbkap
This commit is contained in:
@@ -372,6 +372,8 @@ Snapshot(JSContext *cx, JSObject *obj, uintN flags, typename EnumPolicy::ResultV
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace js {
|
||||
|
||||
bool
|
||||
VectorToIdArray(JSContext *cx, AutoIdVector &props, JSIdArray **idap)
|
||||
{
|
||||
@@ -389,12 +391,14 @@ VectorToIdArray(JSContext *cx, AutoIdVector &props, JSIdArray **idap)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
JS_FRIEND_API(bool)
|
||||
GetPropertyNames(JSContext *cx, JSObject *obj, uintN flags, AutoIdVector *props)
|
||||
{
|
||||
return Snapshot<KeyEnumeration>(cx, obj, flags & (JSITER_OWNONLY | JSITER_HIDDEN), props);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static inline bool
|
||||
GetCustomIterator(JSContext *cx, JSObject *obj, uintN flags, Value *vp)
|
||||
{
|
||||
@@ -559,6 +563,8 @@ VectorToKeyIterator(JSContext *cx, JSObject *obj, uintN flags, AutoIdVector &key
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace js {
|
||||
|
||||
bool
|
||||
VectorToKeyIterator(JSContext *cx, JSObject *obj, uintN flags, AutoIdVector &props, Value *vp)
|
||||
{
|
||||
@@ -725,6 +731,8 @@ GetIterator(JSContext *cx, JSObject *obj, uintN flags, Value *vp)
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static JSObject *
|
||||
iterator_iterator(JSContext *cx, JSObject *obj, JSBool keysonly)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user