зеркало из https://github.com/mozilla/pjs.git
Bug 676738 - Change the index argument to JS_HasElement from jsint to uint32. r=dmandelin
--HG-- extra : rebase_source : 20e35753ef5af787d1755ab8c1b68d5b7a43cce1
This commit is contained in:
Родитель
c15d32fba9
Коммит
d95a1b785d
|
@ -9824,12 +9824,7 @@ nsHTMLPluginObjElementSH::GetProperty(nsIXPConnectWrappedNative *wrapper,
|
|||
JSBool found = PR_FALSE;
|
||||
|
||||
if (!ObjectIsNativeWrapper(cx, obj)) {
|
||||
if (JSID_IS_STRING(id)) {
|
||||
*_retval = ::JS_HasPropertyById(cx, pi_obj, id, &found);
|
||||
} else {
|
||||
*_retval = ::JS_HasElement(cx, pi_obj, JSID_TO_INT(id), &found);
|
||||
}
|
||||
|
||||
if (!*_retval) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
@ -9863,12 +9858,7 @@ nsHTMLPluginObjElementSH::SetProperty(nsIXPConnectWrappedNative *wrapper,
|
|||
JSBool found = PR_FALSE;
|
||||
|
||||
if (!ObjectIsNativeWrapper(cx, obj)) {
|
||||
if (JSID_IS_STRING(id)) {
|
||||
*_retval = ::JS_HasPropertyById(cx, pi_obj, id, &found);
|
||||
} else {
|
||||
*_retval = ::JS_HasElement(cx, pi_obj, JSID_TO_INT(id), &found);
|
||||
}
|
||||
|
||||
if (!*_retval) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
|
|
@ -3294,9 +3294,13 @@ JS_HasPropertyById(JSContext *cx, JSObject *obj, jsid id, JSBool *foundp)
|
|||
}
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
JS_HasElement(JSContext *cx, JSObject *obj, jsint index, JSBool *foundp)
|
||||
JS_HasElement(JSContext *cx, JSObject *obj, uint32 index, JSBool *foundp)
|
||||
{
|
||||
return JS_HasPropertyById(cx, obj, INT_TO_JSID(index), foundp);
|
||||
CHECK_REQUEST(cx);
|
||||
jsid id;
|
||||
if (!IndexToId(cx, index, &id))
|
||||
return false;
|
||||
return JS_HasPropertyById(cx, obj, id, foundp);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
|
|
|
@ -2493,7 +2493,7 @@ extern JS_PUBLIC_API(JSBool)
|
|||
JS_AlreadyHasOwnElement(JSContext *cx, JSObject *obj, uint32 index, JSBool *foundp);
|
||||
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_HasElement(JSContext *cx, JSObject *obj, jsint index, JSBool *foundp);
|
||||
JS_HasElement(JSContext *cx, JSObject *obj, uint32 index, JSBool *foundp);
|
||||
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_LookupElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp);
|
||||
|
|
Загрузка…
Ссылка в новой задаче