зеркало из https://github.com/mozilla/gecko-dev.git
Bug 828248 - Part b: Pass MutableHandleId to IndexToId and IndexToIdSlow; r=sfink
This commit is contained in:
Родитель
d43e8bee85
Коммит
23f700bed5
|
@ -1805,7 +1805,7 @@ ParallelArrayObject::defineElement(JSContext *cx, HandleObject obj,
|
||||||
PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
|
PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return defineGeneric(cx, obj, id, value, getter, setter, attrs);
|
return defineGeneric(cx, obj, id, value, getter, setter, attrs);
|
||||||
}
|
}
|
||||||
|
@ -1929,7 +1929,7 @@ ParallelArrayObject::setElement(JSContext *cx, HandleObject obj, uint32_t index,
|
||||||
MutableHandleValue vp, JSBool strict)
|
MutableHandleValue vp, JSBool strict)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return setGeneric(cx, obj, id, vp, strict);
|
return setGeneric(cx, obj, id, vp, strict);
|
||||||
}
|
}
|
||||||
|
@ -2005,7 +2005,7 @@ ParallelArrayObject::setElementAttributes(JSContext *cx, HandleObject obj, uint3
|
||||||
unsigned *attrsp)
|
unsigned *attrsp)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return setGenericAttributes(cx, obj, id, attrsp);
|
return setGenericAttributes(cx, obj, id, attrsp);
|
||||||
}
|
}
|
||||||
|
@ -2051,7 +2051,7 @@ ParallelArrayObject::deleteElement(JSContext *cx, HandleObject obj, uint32_t ind
|
||||||
MutableHandleValue rval, JSBool strict)
|
MutableHandleValue rval, JSBool strict)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return deleteGeneric(cx, obj, id, rval, strict);
|
return deleteGeneric(cx, obj, id, rval, strict);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3613,7 +3613,7 @@ JS_LookupElement(JSContext *cx, JSObject *objArg, uint32_t index, jsval *vp)
|
||||||
{
|
{
|
||||||
RootedObject obj(cx, objArg);
|
RootedObject obj(cx, objArg);
|
||||||
CHECK_REQUEST(cx);
|
CHECK_REQUEST(cx);
|
||||||
jsid id;
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, &id))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return JS_LookupPropertyById(cx, obj, id, vp);
|
return JS_LookupPropertyById(cx, obj, id, vp);
|
||||||
|
@ -3686,7 +3686,7 @@ JS_HasElement(JSContext *cx, JSObject *objArg, uint32_t index, JSBool *foundp)
|
||||||
RootedObject obj(cx, objArg);
|
RootedObject obj(cx, objArg);
|
||||||
AssertHeapIsIdle(cx);
|
AssertHeapIsIdle(cx);
|
||||||
CHECK_REQUEST(cx);
|
CHECK_REQUEST(cx);
|
||||||
jsid id;
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, &id))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return JS_HasPropertyById(cx, obj, id, foundp);
|
return JS_HasPropertyById(cx, obj, id, foundp);
|
||||||
|
@ -3737,7 +3737,7 @@ JS_AlreadyHasOwnElement(JSContext *cx, JSObject *objArg, uint32_t index, JSBool
|
||||||
RootedObject obj(cx, objArg);
|
RootedObject obj(cx, objArg);
|
||||||
AssertHeapIsIdle(cx);
|
AssertHeapIsIdle(cx);
|
||||||
CHECK_REQUEST(cx);
|
CHECK_REQUEST(cx);
|
||||||
jsid id;
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, &id))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return JS_AlreadyHasOwnPropertyById(cx, obj, id, foundp);
|
return JS_AlreadyHasOwnPropertyById(cx, obj, id, foundp);
|
||||||
|
@ -3874,7 +3874,7 @@ JS_DefineElement(JSContext *cx, JSObject *objArg, uint32_t index, jsval valueArg
|
||||||
AssertHeapIsIdle(cx);
|
AssertHeapIsIdle(cx);
|
||||||
CHECK_REQUEST(cx);
|
CHECK_REQUEST(cx);
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return DefinePropertyById(cx, obj, id, value, GetterWrapper(getter),
|
return DefinePropertyById(cx, obj, id, value, GetterWrapper(getter),
|
||||||
SetterWrapper(setter), attrs, 0, 0);
|
SetterWrapper(setter), attrs, 0, 0);
|
||||||
|
@ -7098,9 +7098,13 @@ BOOL WINAPI DllMain (HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
JS_PUBLIC_API(JSBool)
|
JS_PUBLIC_API(JSBool)
|
||||||
JS_IndexToId(JSContext *cx, uint32_t index, jsid *id)
|
JS_IndexToId(JSContext *cx, uint32_t index, jsid *idp)
|
||||||
{
|
{
|
||||||
return IndexToId(cx, index, id);
|
RootedId id(cx);
|
||||||
|
if (!IndexToId(cx, index, &id))
|
||||||
|
return false;
|
||||||
|
*idp = id;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
JS_PUBLIC_API(JSBool)
|
JS_PUBLIC_API(JSBool)
|
||||||
|
|
|
@ -263,7 +263,7 @@ JSObject::arrayGetOwnDataElement(JSContext *cx, size_t i, Value *vp)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
jsid id;
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, i, &id))
|
if (!IndexToId(cx, i, &id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ bool
|
||||||
DoubleIndexToId(JSContext *cx, double index, MutableHandleId id)
|
DoubleIndexToId(JSContext *cx, double index, MutableHandleId id)
|
||||||
{
|
{
|
||||||
if (index == uint32_t(index))
|
if (index == uint32_t(index))
|
||||||
return IndexToId(cx, uint32_t(index), id.address());
|
return IndexToId(cx, uint32_t(index), id);
|
||||||
|
|
||||||
return ValueToId(cx, DoubleValue(index), id);
|
return ValueToId(cx, DoubleValue(index), id);
|
||||||
}
|
}
|
||||||
|
@ -868,7 +868,7 @@ array_setElement(JSContext *cx, HandleObject obj, uint32_t index,
|
||||||
MutableHandleValue vp, JSBool strict)
|
MutableHandleValue vp, JSBool strict)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!obj->isDenseArray())
|
if (!obj->isDenseArray())
|
||||||
|
@ -2258,7 +2258,7 @@ NewbornArrayPushImpl(JSContext *cx, HandleObject obj, const Value &v)
|
||||||
/* This can happen in one evil case. See bug 630377. */
|
/* This can happen in one evil case. See bug 630377. */
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
RootedValue nv(cx, v);
|
RootedValue nv(cx, v);
|
||||||
return IndexToId(cx, length, id.address()) &&
|
return IndexToId(cx, length, &id) &&
|
||||||
baseops::DefineGeneric(cx, obj, id, nv, NULL, NULL, JSPROP_ENUMERATE);
|
baseops::DefineGeneric(cx, obj, id, nv, NULL, NULL, JSPROP_ENUMERATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -398,7 +398,7 @@ js::AtomizeChars(JSContext *cx, const jschar *chars, size_t length, InternBehavi
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
js::IndexToIdSlow(JSContext *cx, uint32_t index, jsid *idp)
|
js::IndexToIdSlow(JSContext *cx, uint32_t index, MutableHandleId idp)
|
||||||
{
|
{
|
||||||
JS_ASSERT(index > JSID_INT_MAX);
|
JS_ASSERT(index > JSID_INT_MAX);
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ js::IndexToIdSlow(JSContext *cx, uint32_t index, jsid *idp)
|
||||||
if (!atom)
|
if (!atom)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
*idp = JSID_FROM_BITS((size_t)atom);
|
idp.set(JSID_FROM_BITS((size_t)atom));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,15 +95,15 @@ BackfillIndexInCharBuffer(uint32_t index, mozilla::RangedPtr<T> end)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
IndexToIdSlow(JSContext *cx, uint32_t index, jsid *idp);
|
IndexToIdSlow(JSContext *cx, uint32_t index, MutableHandleId idp);
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
IndexToId(JSContext *cx, uint32_t index, jsid *idp)
|
IndexToId(JSContext *cx, uint32_t index, MutableHandleId idp)
|
||||||
{
|
{
|
||||||
MaybeCheckStackRoots(cx);
|
MaybeCheckStackRoots(cx);
|
||||||
|
|
||||||
if (index <= JSID_INT_MAX) {
|
if (index <= JSID_INT_MAX) {
|
||||||
*idp = INT_TO_JSID(index);
|
idp.set(INT_TO_JSID(index));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1184,7 +1184,7 @@ js_SuppressDeletedProperty(JSContext *cx, HandleObject obj, jsid id)
|
||||||
bool
|
bool
|
||||||
js_SuppressDeletedElement(JSContext *cx, HandleObject obj, uint32_t index)
|
js_SuppressDeletedElement(JSContext *cx, HandleObject obj, uint32_t index)
|
||||||
{
|
{
|
||||||
jsid id;
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, &id))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return js_SuppressDeletedProperty(cx, obj, id);
|
return js_SuppressDeletedProperty(cx, obj, id);
|
||||||
|
|
|
@ -1545,7 +1545,7 @@ JSObject::nonNativeSetElement(JSContext *cx, HandleObject obj,
|
||||||
{
|
{
|
||||||
if (JS_UNLIKELY(obj->watched())) {
|
if (JS_UNLIKELY(obj->watched())) {
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
WatchpointMap *wpmap = cx->compartment->watchpointMap;
|
WatchpointMap *wpmap = cx->compartment->watchpointMap;
|
||||||
|
@ -2896,7 +2896,7 @@ baseops::DefineElement(JSContext *cx, HandleObject obj, uint32_t index, HandleVa
|
||||||
|
|
||||||
AutoRooterGetterSetter gsRoot(cx, attrs, &getter, &setter);
|
AutoRooterGetterSetter gsRoot(cx, attrs, &getter, &setter);
|
||||||
|
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return DefineNativeProperty(cx, obj, id, value, getter, setter, attrs, 0, 0);
|
return DefineNativeProperty(cx, obj, id, value, getter, setter, attrs, 0, 0);
|
||||||
|
@ -3174,7 +3174,7 @@ baseops::LookupElement(JSContext *cx, HandleObject obj, uint32_t index,
|
||||||
MutableHandleObject objp, MutableHandleShape propp)
|
MutableHandleObject objp, MutableHandleShape propp)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return LookupPropertyWithFlagsInline(cx, obj, id, cx->resolveFlags, objp, propp);
|
return LookupPropertyWithFlagsInline(cx, obj, id, cx->resolveFlags, objp, propp);
|
||||||
|
@ -3430,7 +3430,7 @@ JSBool
|
||||||
baseops::GetElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index,
|
baseops::GetElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index,
|
||||||
MutableHandleValue vp)
|
MutableHandleValue vp)
|
||||||
{
|
{
|
||||||
jsid id;
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, &id))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -3772,7 +3772,7 @@ baseops::SetElementHelper(JSContext *cx, HandleObject obj, HandleObject receiver
|
||||||
unsigned defineHow, MutableHandleValue vp, JSBool strict)
|
unsigned defineHow, MutableHandleValue vp, JSBool strict)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return baseops::SetPropertyHelper(cx, obj, receiver, id, defineHow, vp, strict);
|
return baseops::SetPropertyHelper(cx, obj, receiver, id, defineHow, vp, strict);
|
||||||
}
|
}
|
||||||
|
@ -3895,7 +3895,7 @@ baseops::DeleteElement(JSContext *cx, HandleObject obj, uint32_t index,
|
||||||
MutableHandleValue rval, JSBool strict)
|
MutableHandleValue rval, JSBool strict)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return baseops::DeleteGeneric(cx, obj, id, rval, strict);
|
return baseops::DeleteGeneric(cx, obj, id, rval, strict);
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,7 @@ JSObject::deleteProperty(JSContext *cx, js::HandleObject obj,
|
||||||
JSObject::deleteElement(JSContext *cx, js::HandleObject obj,
|
JSObject::deleteElement(JSContext *cx, js::HandleObject obj,
|
||||||
uint32_t index, js::MutableHandleValue rval, bool strict)
|
uint32_t index, js::MutableHandleValue rval, bool strict)
|
||||||
{
|
{
|
||||||
jsid id;
|
js::RootedId id(cx);
|
||||||
if (!js::IndexToId(cx, index, &id))
|
if (!js::IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
js::types::AddTypePropertyId(cx, obj, id, js::types::Type::UndefinedType());
|
js::types::AddTypePropertyId(cx, obj, id, js::types::Type::UndefinedType());
|
||||||
|
@ -1111,7 +1111,7 @@ JSObject::getElement(JSContext *cx, js::HandleObject obj, js::HandleObject recei
|
||||||
return op(cx, obj, receiver, index, vp);
|
return op(cx, obj, receiver, index, vp);
|
||||||
|
|
||||||
js::RootedId id(cx);
|
js::RootedId id(cx);
|
||||||
if (!js::IndexToId(cx, index, id.address()))
|
if (!js::IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return getGeneric(cx, obj, receiver, id, vp);
|
return getGeneric(cx, obj, receiver, id, vp);
|
||||||
}
|
}
|
||||||
|
@ -1131,7 +1131,7 @@ JSObject::getElementIfPresent(JSContext *cx, js::HandleObject obj, js::HandleObj
|
||||||
* doing index-to-id conversions, we can use those here.
|
* doing index-to-id conversions, we can use those here.
|
||||||
*/
|
*/
|
||||||
js::RootedId id(cx);
|
js::RootedId id(cx);
|
||||||
if (!js::IndexToId(cx, index, id.address()))
|
if (!js::IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
js::RootedObject obj2(cx);
|
js::RootedObject obj2(cx);
|
||||||
|
@ -1177,7 +1177,7 @@ JSObject::getElementAttributes(JSContext *cx, js::HandleObject obj,
|
||||||
uint32_t index, unsigned *attrsp)
|
uint32_t index, unsigned *attrsp)
|
||||||
{
|
{
|
||||||
js::RootedId id(cx);
|
js::RootedId id(cx);
|
||||||
if (!js::IndexToId(cx, index, id.address()))
|
if (!js::IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return getGenericAttributes(cx, obj, id, attrsp);
|
return getGenericAttributes(cx, obj, id, attrsp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -769,7 +769,7 @@ Walk(JSContext *cx, HandleObject holder, HandleId name, HandleValue reviver, Mut
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
RootedValue newElement(cx);
|
RootedValue newElement(cx);
|
||||||
for (uint32_t i = 0; i < length; i++) {
|
for (uint32_t i = 0; i < length; i++) {
|
||||||
if (!IndexToId(cx, i, id.address()))
|
if (!IndexToId(cx, i, &id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Step 2a(iii)(1). */
|
/* Step 2a(iii)(1). */
|
||||||
|
|
|
@ -120,7 +120,7 @@ BaseProxyHandler::getElementIfPresent(JSContext *cx, JSObject *proxy_, JSObject
|
||||||
RootedObject proxy(cx, proxy_);
|
RootedObject proxy(cx, proxy_);
|
||||||
RootedObject receiver(cx, receiver_);
|
RootedObject receiver(cx, receiver_);
|
||||||
|
|
||||||
jsid id;
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, &id))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -2364,7 +2364,7 @@ Proxy::getElementIfPresent(JSContext *cx, HandleObject proxy, HandleObject recei
|
||||||
}
|
}
|
||||||
|
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool hasOwn;
|
bool hasOwn;
|
||||||
|
@ -2555,7 +2555,7 @@ proxy_LookupElement(JSContext *cx, HandleObject obj, uint32_t index,
|
||||||
MutableHandleObject objp, MutableHandleShape propp)
|
MutableHandleObject objp, MutableHandleShape propp)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return proxy_LookupGeneric(cx, obj, id, objp, propp);
|
return proxy_LookupGeneric(cx, obj, id, objp, propp);
|
||||||
}
|
}
|
||||||
|
@ -2595,7 +2595,7 @@ proxy_DefineElement(JSContext *cx, HandleObject obj, uint32_t index, HandleValue
|
||||||
PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
|
PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return proxy_DefineGeneric(cx, obj, id, value, getter, setter, attrs);
|
return proxy_DefineGeneric(cx, obj, id, value, getter, setter, attrs);
|
||||||
}
|
}
|
||||||
|
@ -2628,7 +2628,7 @@ proxy_GetElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_
|
||||||
MutableHandleValue vp)
|
MutableHandleValue vp)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return proxy_GetGeneric(cx, obj, receiver, id, vp);
|
return proxy_GetGeneric(cx, obj, receiver, id, vp);
|
||||||
}
|
}
|
||||||
|
@ -2668,7 +2668,7 @@ proxy_SetElement(JSContext *cx, HandleObject obj, uint32_t index,
|
||||||
MutableHandleValue vp, JSBool strict)
|
MutableHandleValue vp, JSBool strict)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return proxy_SetGeneric(cx, obj, id, vp, strict);
|
return proxy_SetGeneric(cx, obj, id, vp, strict);
|
||||||
}
|
}
|
||||||
|
@ -2702,7 +2702,7 @@ static JSBool
|
||||||
proxy_GetElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp)
|
proxy_GetElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return proxy_GetGenericAttributes(cx, obj, id, attrsp);
|
return proxy_GetGenericAttributes(cx, obj, id, attrsp);
|
||||||
}
|
}
|
||||||
|
@ -2736,7 +2736,7 @@ static JSBool
|
||||||
proxy_SetElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp)
|
proxy_SetElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return proxy_SetGenericAttributes(cx, obj, id, attrsp);
|
return proxy_SetGenericAttributes(cx, obj, id, attrsp);
|
||||||
}
|
}
|
||||||
|
@ -2773,7 +2773,7 @@ proxy_DeleteElement(JSContext *cx, HandleObject obj, uint32_t index,
|
||||||
MutableHandleValue rval, JSBool strict)
|
MutableHandleValue rval, JSBool strict)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return proxy_DeleteGeneric(cx, obj, id, rval, strict);
|
return proxy_DeleteGeneric(cx, obj, id, rval, strict);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4747,7 +4747,7 @@ xml_lookupElement(JSContext *cx, HandleObject obj, uint32_t index, MutableHandle
|
||||||
}
|
}
|
||||||
|
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
RootedShape shape(cx, js_AddNativeProperty(cx, obj, id, GetProperty, PutProperty,
|
RootedShape shape(cx, js_AddNativeProperty(cx, obj, id, GetProperty, PutProperty,
|
||||||
|
@ -4795,7 +4795,7 @@ xml_defineElement(JSContext *cx, HandleObject obj, uint32_t index, HandleValue v
|
||||||
PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
|
PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return xml_defineGeneric(cx, obj, id, v, getter, setter, attrs);
|
return xml_defineGeneric(cx, obj, id, v, getter, setter, attrs);
|
||||||
}
|
}
|
||||||
|
@ -4832,7 +4832,7 @@ static JSBool
|
||||||
xml_getElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, MutableHandleValue vp)
|
xml_getElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, MutableHandleValue vp)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return xml_getGeneric(cx, obj, receiver, id, vp);
|
return xml_getGeneric(cx, obj, receiver, id, vp);
|
||||||
}
|
}
|
||||||
|
@ -4861,7 +4861,7 @@ static JSBool
|
||||||
xml_setElement(JSContext *cx, HandleObject obj, uint32_t index, MutableHandleValue vp, JSBool strict)
|
xml_setElement(JSContext *cx, HandleObject obj, uint32_t index, MutableHandleValue vp, JSBool strict)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return xml_setGeneric(cx, obj, id, vp, strict);
|
return xml_setGeneric(cx, obj, id, vp, strict);
|
||||||
}
|
}
|
||||||
|
@ -4895,7 +4895,7 @@ static JSBool
|
||||||
xml_getElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp)
|
xml_getElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return xml_getGenericAttributes(cx, obj, id, attrsp);
|
return xml_getGenericAttributes(cx, obj, id, attrsp);
|
||||||
}
|
}
|
||||||
|
@ -4933,7 +4933,7 @@ static JSBool
|
||||||
xml_setElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp)
|
xml_setElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return xml_setGenericAttributes(cx, obj, id, attrsp);
|
return xml_setGenericAttributes(cx, obj, id, attrsp);
|
||||||
}
|
}
|
||||||
|
@ -5456,7 +5456,7 @@ xml_appendChild(JSContext *cx, unsigned argc, jsval *vp)
|
||||||
JSXML *vxml = (JSXML *) vobj->getPrivate();
|
JSXML *vxml = (JSXML *) vobj->getPrivate();
|
||||||
JS_ASSERT(vxml->xml_class == JSXML_CLASS_LIST);
|
JS_ASSERT(vxml->xml_class == JSXML_CLASS_LIST);
|
||||||
|
|
||||||
if (!IndexToId(cx, vxml->xml_kids.length, name.address()))
|
if (!IndexToId(cx, vxml->xml_kids.length, &name))
|
||||||
return JS_FALSE;
|
return JS_FALSE;
|
||||||
*vp = (argc != 0) ? vp[2] : JSVAL_VOID;
|
*vp = (argc != 0) ? vp[2] : JSVAL_VOID;
|
||||||
|
|
||||||
|
|
|
@ -376,7 +376,7 @@ with_LookupElement(JSContext *cx, HandleObject obj, uint32_t index,
|
||||||
MutableHandleObject objp, MutableHandleShape propp)
|
MutableHandleObject objp, MutableHandleShape propp)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return with_LookupGeneric(cx, obj, id, objp, propp);
|
return with_LookupGeneric(cx, obj, id, objp, propp);
|
||||||
}
|
}
|
||||||
|
@ -410,7 +410,7 @@ with_GetElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t
|
||||||
MutableHandleValue vp)
|
MutableHandleValue vp)
|
||||||
{
|
{
|
||||||
RootedId id(cx);
|
RootedId id(cx);
|
||||||
if (!IndexToId(cx, index, id.address()))
|
if (!IndexToId(cx, index, &id))
|
||||||
return false;
|
return false;
|
||||||
return with_GetGeneric(cx, obj, receiver, id, vp);
|
return with_GetGeneric(cx, obj, receiver, id, vp);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче