(No bug): Pass string to JS_ReportErrorNumber, as required by JSMSG_MORE_ARGS_NEEDED. r=jorendorff
authorJim Blandy <jimb@mozilla.com>
Tue, 09 Aug 2011 20:45:02 -0700
changeset 74160 aa0058c5cebf26e6eb9eb469f0853a3bb1bd6dad
parent 74159 1140e223915f248108fe5815d49495e8fb9b6d5e
child 74161 f4acfd3b1ce8a94f2b2c21b89b6f21a7f1b48502
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersjorendorff
milestone8.0a1
(No bug): Pass string to JS_ReportErrorNumber, as required by JSMSG_MORE_ARGS_NEEDED. r=jorendorff
js/src/shell/jsheaptools.cpp
--- a/js/src/shell/jsheaptools.cpp
+++ b/js/src/shell/jsheaptools.cpp
@@ -536,17 +536,17 @@ ReferenceFinder::findReferences(JSObject
  * object will have a property named "edge: machine stack"; the referrers will
  * be 'null', because they are roots.
  */
 JSBool
 FindReferences(JSContext *cx, uintN argc, jsval *vp)
 {
     if (argc < 1) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_MORE_ARGS_NEEDED,
-                             "findReferences", 1, "");
+                             "findReferences", "0", "s");
         return false;
     }
 
     jsval target = JS_ARGV(cx, vp)[0];
     if (!JSVAL_IS_OBJECT(target) || JSVAL_IS_NULL(target)) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_UNEXPECTED_TYPE,
                              "argument", "not an object");
         return false;