Bug 1289050 - Part 14: Remove pseudo-ASCII variant of JS_ReportError*. r=jwalden
authorTooru Fujisawa <arai_a@mac.com>
Sat, 10 Sep 2016 10:29:47 +0900
changeset 315969 3b4b49952871c7fb905aaed928e183a8a26191df
parent 315968 2422b2dcfcb20ae38cc76fd5ce31a22baf37e7da
child 315970 5ffed033557e5b6f9694123f1948f867f913ede3
child 316042 3fc3826c761ee16c2c8c7bde129927f8e1466615
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 14: Remove pseudo-ASCII variant of JS_ReportError*. r=jwalden
js/src/js.msg
js/src/jsapi.cpp
js/src/jsapi.h
--- a/js/src/js.msg
+++ b/js/src/js.msg
@@ -29,17 +29,17 @@
  *
  * e.g.
  *
  * MSG_DEF(JSMSG_NOT_A_SUBSPECIES, 2, JSEXN_NONE,
  *         "{0} is not a member of the {1} family")
  *
  * can be used:
  *
- * JS_ReportErrorNumber(JSMSG_NOT_A_SUBSPECIES, "Rhino", "Monkey");
+ * JS_ReportErrorNumberASCII(JSMSG_NOT_A_SUBSPECIES, "Rhino", "Monkey");
  *
  * to report:
  *
  * "Rhino is not a member of the Monkey family"
  */
 
 MSG_DEF(JSMSG_NOT_AN_ERROR,            0, JSEXN_ERR, "<Error #0 is reserved>")
 MSG_DEF(JSMSG_NOT_DEFINED,             1, JSEXN_REFERENCEERR, "{0} is not defined")
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -5561,27 +5561,16 @@ JS_ParseJSONWithReviver(JSContext* cx, H
     return stableChars.isLatin1()
            ? ParseJSONWithReviver(cx, stableChars.latin1Range(), reviver, vp)
            : ParseJSONWithReviver(cx, stableChars.twoByteRange(), reviver, vp);
 }
 
 /************************************************************************/
 
 JS_PUBLIC_API(void)
-JS_ReportError(JSContext* cx, const char* format, ...)
-{
-    va_list ap;
-
-    AssertHeapIsIdle(cx);
-    va_start(ap, format);
-    ReportErrorVA(cx, JSREPORT_ERROR, format, ArgumentsAreLatin1, ap);
-    va_end(ap);
-}
-
-JS_PUBLIC_API(void)
 JS_ReportErrorASCII(JSContext* cx, const char* format, ...)
 {
     va_list ap;
 
     AssertHeapIsIdle(cx);
     va_start(ap, format);
     ReportErrorVA(cx, JSREPORT_ERROR, format, ArgumentsAreASCII, ap);
     va_end(ap);
@@ -5605,36 +5594,16 @@ JS_ReportErrorUTF8(JSContext* cx, const 
 
     AssertHeapIsIdle(cx);
     va_start(ap, format);
     ReportErrorVA(cx, JSREPORT_ERROR, format, ArgumentsAreUTF8, ap);
     va_end(ap);
 }
 
 JS_PUBLIC_API(void)
-JS_ReportErrorNumber(JSContext* cx, JSErrorCallback errorCallback,
-                     void* userRef, const unsigned errorNumber, ...)
-{
-    va_list ap;
-    va_start(ap, errorNumber);
-    JS_ReportErrorNumberVA(cx, errorCallback, userRef, errorNumber, ap);
-    va_end(ap);
-}
-
-JS_PUBLIC_API(void)
-JS_ReportErrorNumberVA(JSContext* cx, JSErrorCallback errorCallback,
-                       void* userRef, const unsigned errorNumber,
-                       va_list ap)
-{
-    AssertHeapIsIdle(cx);
-    ReportErrorNumberVA(cx, JSREPORT_ERROR, errorCallback, userRef,
-                        errorNumber, ArgumentsAreLatin1, ap);
-}
-
-JS_PUBLIC_API(void)
 JS_ReportErrorNumberASCII(JSContext* cx, JSErrorCallback errorCallback,
                           void* userRef, const unsigned errorNumber, ...)
 {
     va_list ap;
     va_start(ap, errorNumber);
     JS_ReportErrorNumberASCIIVA(cx, errorCallback, userRef, errorNumber, ap);
     va_end(ap);
 }
@@ -5708,29 +5677,16 @@ JS_ReportErrorNumberUCArray(JSContext* c
                             const char16_t** args)
 {
     AssertHeapIsIdle(cx);
     ReportErrorNumberUCArray(cx, JSREPORT_ERROR, errorCallback, userRef,
                              errorNumber, args);
 }
 
 JS_PUBLIC_API(bool)
-JS_ReportWarning(JSContext* cx, const char* format, ...)
-{
-    va_list ap;
-    bool ok;
-
-    AssertHeapIsIdle(cx);
-    va_start(ap, format);
-    ok = ReportErrorVA(cx, JSREPORT_WARNING, format, ArgumentsAreLatin1, ap);
-    va_end(ap);
-    return ok;
-}
-
-JS_PUBLIC_API(bool)
 JS_ReportWarningASCII(JSContext* cx, const char* format, ...)
 {
     va_list ap;
     bool ok;
 
     AssertHeapIsIdle(cx);
     va_start(ap, format);
     ok = ReportErrorVA(cx, JSREPORT_WARNING, format, ArgumentsAreASCII, ap);
@@ -5760,32 +5716,16 @@ JS_ReportWarningUTF8(JSContext* cx, cons
     AssertHeapIsIdle(cx);
     va_start(ap, format);
     ok = ReportErrorVA(cx, JSREPORT_WARNING, format, ArgumentsAreUTF8, ap);
     va_end(ap);
     return ok;
 }
 
 JS_PUBLIC_API(bool)
-JS_ReportErrorFlagsAndNumber(JSContext* cx, unsigned flags,
-                             JSErrorCallback errorCallback, void* userRef,
-                             const unsigned errorNumber, ...)
-{
-    va_list ap;
-    bool ok;
-
-    AssertHeapIsIdle(cx);
-    va_start(ap, errorNumber);
-    ok = ReportErrorNumberVA(cx, flags, errorCallback, userRef,
-                             errorNumber, ArgumentsAreLatin1, ap);
-    va_end(ap);
-    return ok;
-}
-
-JS_PUBLIC_API(bool)
 JS_ReportErrorFlagsAndNumberASCII(JSContext* cx, unsigned flags,
                                   JSErrorCallback errorCallback, void* userRef,
                                   const unsigned errorNumber, ...)
 {
     va_list ap;
     bool ok;
 
     AssertHeapIsIdle(cx);
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -5179,41 +5179,28 @@ namespace JS {
 const uint16_t MaxNumErrorArguments = 10;
 };
 
 /**
  * Report an exception represented by the sprintf-like conversion of format
  * and its arguments.
  */
 extern JS_PUBLIC_API(void)
-JS_ReportError(JSContext* cx, const char* format, ...);
-
-extern JS_PUBLIC_API(void)
 JS_ReportErrorASCII(JSContext* cx, const char* format, ...);
 
 extern JS_PUBLIC_API(void)
 JS_ReportErrorLatin1(JSContext* cx, const char* format, ...);
 
 extern JS_PUBLIC_API(void)
 JS_ReportErrorUTF8(JSContext* cx, const char* format, ...);
 
 /*
  * Use an errorNumber to retrieve the format string, args are char*
  */
 extern JS_PUBLIC_API(void)
-JS_ReportErrorNumber(JSContext* cx, JSErrorCallback errorCallback,
-                     void* userRef, const unsigned errorNumber, ...);
-
-#ifdef va_start
-extern JS_PUBLIC_API(void)
-JS_ReportErrorNumberVA(JSContext* cx, JSErrorCallback errorCallback,
-                       void* userRef, const unsigned errorNumber, va_list ap);
-#endif
-
-extern JS_PUBLIC_API(void)
 JS_ReportErrorNumberASCII(JSContext* cx, JSErrorCallback errorCallback,
                           void* userRef, const unsigned errorNumber, ...);
 
 extern JS_PUBLIC_API(void)
 JS_ReportErrorNumberASCIIVA(JSContext* cx, JSErrorCallback errorCallback,
                             void* userRef, const unsigned errorNumber, va_list ap);
 
 extern JS_PUBLIC_API(void)
@@ -5250,33 +5237,25 @@ JS_ReportErrorNumberUCArray(JSContext* c
 
 /**
  * As above, but report a warning instead (JSREPORT_IS_WARNING(report.flags)).
  * Return true if there was no error trying to issue the warning, and if the
  * warning was not converted into an error due to the JSOPTION_WERROR option
  * being set, false otherwise.
  */
 extern JS_PUBLIC_API(bool)
-JS_ReportWarning(JSContext* cx, const char* format, ...);
-
-extern JS_PUBLIC_API(bool)
 JS_ReportWarningASCII(JSContext* cx, const char* format, ...);
 
 extern JS_PUBLIC_API(bool)
 JS_ReportWarningLatin1(JSContext* cx, const char* format, ...);
 
 extern JS_PUBLIC_API(bool)
 JS_ReportWarningUTF8(JSContext* cx, const char* format, ...);
 
 extern JS_PUBLIC_API(bool)
-JS_ReportErrorFlagsAndNumber(JSContext* cx, unsigned flags,
-                             JSErrorCallback errorCallback, void* userRef,
-                             const unsigned errorNumber, ...);
-
-extern JS_PUBLIC_API(bool)
 JS_ReportErrorFlagsAndNumberASCII(JSContext* cx, unsigned flags,
                                   JSErrorCallback errorCallback, void* userRef,
                                   const unsigned errorNumber, ...);
 
 extern JS_PUBLIC_API(bool)
 JS_ReportErrorFlagsAndNumberLatin1(JSContext* cx, unsigned flags,
                                    JSErrorCallback errorCallback, void* userRef,
                                    const unsigned errorNumber, ...);