diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index 62f8e83c0806..23e118bfaca3 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -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++; diff --git a/js/src/json.cpp b/js/src/json.cpp index d2fcd3ccbfba..f75aa06a98e0 100644 --- a/js/src/json.cpp +++ b/js/src/json.cpp @@ -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))