Count both the getter and setter for a given property. bug 381303, r=crowder

This commit is contained in:
mrbkap@gmail.com 2007-05-21 11:02:33 -07:00
Родитель 2985ecac45
Коммит a0b603c49d
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -882,6 +882,8 @@ js_obj_toSource(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
ATOM_TO_STRING(cx->runtime->atomState.getterAtom);
gsop[valcnt] =
ATOM_TO_STRING(cx->runtime->atomState.getAtom);
valcnt++;
}
if (attrs & JSPROP_SETTER) {
val[valcnt] = (jsval) ((JSScopeProperty *)prop)->setter;
@ -889,8 +891,9 @@ js_obj_toSource(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
ATOM_TO_STRING(cx->runtime->atomState.setterAtom);
gsop[valcnt] =
ATOM_TO_STRING(cx->runtime->atomState.setAtom);
valcnt++;
}
valcnt++;
} else {
valcnt = 1;
gsop[0] = NULL;