Bug 1289050 - Part 8.2: Remove unused parameter from ArgumentRangeMismatch and CTYPESMSG_ARG_RANGE_MISMATCH. r=jwalden
authorTooru Fujisawa <arai_a@mac.com>
Fri, 30 Sep 2016 12:34:49 +0900
changeset 315959 bc6b3f284a830f3d8ca5d4e409441c361e3b83fd
parent 315958 245a2abe284edd7049699224ef26df239cef99fa
child 315960 96d5a9486cea49d12ae5066a3e6171b7c48b43bf
push id20634
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:10:13 +0000
treeherderfx-team@afe79b010d13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs1289050
milestone52.0a1
Bug 1289050 - Part 8.2: Remove unused parameter from ArgumentRangeMismatch and CTYPESMSG_ARG_RANGE_MISMATCH. r=jwalden
js/src/ctypes/CTypes.cpp
js/src/ctypes/ctypes.msg
--- a/js/src/ctypes/CTypes.cpp
+++ b/js/src/ctypes/CTypes.cpp
@@ -1341,21 +1341,20 @@ ArrayLengthOverflow(JSContext* cx, unsig
 
   JS_ReportErrorNumber(cx, GetErrorMessage, nullptr,
                        CTYPESMSG_ARRAY_OVERFLOW,
                        valStr, arrStr, expectedLengthStr, actualLengthStr);
   return false;
 }
 
 static bool
-ArgumentRangeMismatch(JSContext* cx, const char* arg, const char* func,
-                     const char* range)
+ArgumentRangeMismatch(JSContext* cx, const char* func, const char* range)
 {
   JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
-                            CTYPESMSG_ARG_RANGE_MISMATCH, arg, func, range);
+                            CTYPESMSG_ARG_RANGE_MISMATCH, func, range);
   return false;
 }
 
 static bool
 ArgumentTypeMismatch(JSContext* cx, const char* arg, const char* func,
                      const char* type)
 {
   JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
@@ -8624,19 +8623,19 @@ Int64Base::ToString(JSContext* cx,
 
   int radix = 10;
   if (args.length() == 1) {
     Value arg = args[0];
     if (arg.isInt32())
       radix = arg.toInt32();
     if (!arg.isInt32() || radix < 2 || radix > 36) {
       if (isUnsigned) {
-        return ArgumentRangeMismatch(cx, "", "UInt64.prototype.toString", "an integer at least 2 and no greater than 36");
+        return ArgumentRangeMismatch(cx, "UInt64.prototype.toString", "an integer at least 2 and no greater than 36");
       }
-      return ArgumentRangeMismatch(cx, "", "Int64.prototype.toString", "an integer at least 2 and no greater than 36");
+      return ArgumentRangeMismatch(cx, "Int64.prototype.toString", "an integer at least 2 and no greater than 36");
     }
   }
 
   AutoString intString;
   if (isUnsigned) {
     IntegerToString(GetInt(obj), radix, intString);
   } else {
     IntegerToString(static_cast<int64_t>(GetInt(obj)), radix, intString);
--- a/js/src/ctypes/ctypes.msg
+++ b/js/src/ctypes/ctypes.msg
@@ -39,17 +39,17 @@ MSG_DEF(CTYPESMSG_FIELD_MISSING, 2, JSEX
 MSG_DEF(CTYPESMSG_PROP_NONSTRING,3, JSEXN_TYPEERR, "property name {0} of {1} is not a string{2}")
 
 /* data finalizer */
 MSG_DEF(CTYPESMSG_EMPTY_FIN,     1, JSEXN_TYPEERR, "attempting to convert an empty CDataFinalizer{0}")
 MSG_DEF(CTYPESMSG_EMPTY_FIN_CALL,1, JSEXN_TYPEERR, "{0} called on empty CDataFinalizer")
 MSG_DEF(CTYPESMSG_FIN_SIZE_ERROR,2, JSEXN_TYPEERR, "expected an object with the same size as argument 1 of {0}, got {1}")
 
 /* native function */
-MSG_DEF(CTYPESMSG_ARG_RANGE_MISMATCH,3, JSEXN_RANGEERR, "{0}argument of {1} must be {2}")
+MSG_DEF(CTYPESMSG_ARG_RANGE_MISMATCH,2, JSEXN_RANGEERR, "argument of {0} must be {1}")
 MSG_DEF(CTYPESMSG_ARG_TYPE_MISMATCH,3, JSEXN_TYPEERR, "{0}argument of {1} must be {2}")
 MSG_DEF(CTYPESMSG_INCOMPATIBLE_CALLEE,2, JSEXN_TYPEERR, "callee is not correct in {0}, got {1}")
 MSG_DEF(CTYPESMSG_INCOMPATIBLE_THIS,2, JSEXN_TYPEERR, "{0} called on incompatible {1}")
 MSG_DEF(CTYPESMSG_INCOMPATIBLE_THIS_TYPE,2, JSEXN_TYPEERR, "{0} called on {1}")
 MSG_DEF(CTYPESMSG_INCOMPATIBLE_THIS_VAL,3, JSEXN_TYPEERR, "{0} called on {1}, got {2}")
 MSG_DEF(CTYPESMSG_WRONG_ARG_LENGTH,3, JSEXN_TYPEERR, "{0} takes {1} argument{2}")
 
 /* overflow */