Bug 518663 - Fix some typos in JSAutoTempValueRooter uses. r=dvander

This commit is contained in:
Jeff Walden 2009-09-24 14:48:24 -07:00
Родитель fa1ba98606
Коммит 03fdbc5d0c
2 изменённых файлов: 4 добавлений и 4 удалений

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

@ -1718,7 +1718,7 @@ InitArrayElements(JSContext *cx, JSObject *obj, jsuint start, jsuint count, jsva
if (!dp)
return JS_FALSE;
tmp[0] = DOUBLE_TO_JSVAL(dp);
JSAutoTempValueRooter(cx, JS_ARRAY_LENGTH(tmp), tmp);
JSAutoTempValueRooter tvr(cx, JS_ARRAY_LENGTH(tmp), tmp);
JSAutoTempIdRooter idr(cx);
do {
tmp[1] = *vector++;

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

@ -106,7 +106,7 @@ js_json_parse(JSContext *cx, uintN argc, jsval *vp)
JSString *s = NULL;
jsval *argv = vp + 2;
jsval reviver = JSVAL_NULL;
JSAutoTempValueRooter(cx, 1, &reviver);
JSAutoTempValueRooter tvr(cx, 1, &reviver);
if (!JS_ConvertArguments(cx, argc, argv, "S / v", &s, &reviver))
return JS_FALSE;
@ -130,8 +130,8 @@ js_json_stringify(JSContext *cx, uintN argc, jsval *vp)
jsval *argv = vp + 2;
JSObject *replacer = NULL;
jsval space = JSVAL_NULL;
JSAutoTempValueRooter(cx, replacer);
JSAutoTempValueRooter(cx, 1, &space);
JSAutoTempValueRooter tvr(cx, replacer);
JSAutoTempValueRooter tvr2(cx, 1, &space);
// Must throw an Error if there isn't a first arg
if (!JS_ConvertArguments(cx, argc, argv, "v / o v", vp, &replacer, &space))