Fix array_pop default return value (390684, r=igor).

This commit is contained in:
brendan@mozilla.org 2007-08-02 11:40:47 -07:00
Родитель f3dde487e1
Коммит df13eadca4
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -1302,7 +1302,9 @@ array_pop(JSContext *cx, uintN argc, jsval *vp)
obj = JS_THIS_OBJECT(cx, vp);
if (!js_GetLengthProperty(cx, obj, &index))
return JS_FALSE;
if (index > 0) {
if (index == 0) {
*vp = JSVAL_VOID;
} else {
index--;
/* Get the to-be-deleted property's value into vp. */