Backed out changeset 1a2627378a0d, didn't tag the reviewer correctly.
authorJeff Walden <jwalden@mit.edu>
Tue, 26 Jul 2016 11:12:21 -0700
changeset 331854 1684231d408ca9fc2d136e01f720a899b72d5282
parent 331853 a2dba32ae074ea3e393f8f6f4477becb47cf3936
child 331855 e17ed0283ffd24e64d975b3a4cde505add6e7cb5
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone50.0a1
backs out1a2627378a0dace519c6e8d6c465f76bc4d8d599
Backed out changeset 1a2627378a0d, didn't tag the reviewer correctly.
dom/bindings/BindingUtils.cpp
dom/bindings/ErrorResult.h
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -81,23 +81,25 @@ GetErrorMessage(void* aUserRef, const un
 }
 
 uint16_t
 GetErrorArgCount(const ErrNum aErrorNumber)
 {
   return GetErrorMessage(nullptr, aErrorNumber)->argCount;
 }
 
-void
-binding_detail::ThrowErrorMessage(JSContext* aCx, const unsigned aErrorNumber, ...)
+bool
+ThrowErrorMessage(JSContext* aCx, const ErrNum aErrorNumber, ...)
 {
   va_list ap;
   va_start(ap, aErrorNumber);
-  JS_ReportErrorNumberVA(aCx, GetErrorMessage, nullptr, aErrorNumber, ap);
+  JS_ReportErrorNumberVA(aCx, GetErrorMessage, nullptr,
+                         static_cast<const unsigned>(aErrorNumber), ap);
   va_end(ap);
+  return false;
 }
 
 bool
 ThrowInvalidThis(JSContext* aCx, const JS::CallArgs& aArgs,
                  bool aSecurityError, const char* aInterfaceName)
 {
   NS_ConvertASCIItoUTF16 ifaceName(aInterfaceName);
   // This should only be called for DOM methods/getters/setters, which
--- a/dom/bindings/ErrorResult.h
+++ b/dom/bindings/ErrorResult.h
@@ -62,28 +62,18 @@ uint16_t constexpr ErrorFormatNumArgs[] 
 #include "mozilla/dom/Errors.msg"
 #undef MSG_DEF
 };
 #endif
 
 uint16_t
 GetErrorArgCount(const ErrNum aErrorNumber);
 
-namespace binding_detail {
-void ThrowErrorMessage(JSContext* aCx, const unsigned aErrorNumber, ...);
-} // namespace binding_detail
-
-template<typename... Ts>
-inline bool
-ThrowErrorMessage(JSContext* aCx, const ErrNum aErrorNumber, Ts&&... aArgs)
-{
-  binding_detail::ThrowErrorMessage(aCx, static_cast<const unsigned>(aErrorNumber),
-                                    mozilla::Forward<Ts>(aArgs)...);
-  return false;
-}
+bool
+ThrowErrorMessage(JSContext* aCx, const ErrNum aErrorNumber, ...);
 
 struct StringArrayAppender
 {
   static void Append(nsTArray<nsString>& aArgs, uint16_t aCount)
   {
     MOZ_RELEASE_ASSERT(aCount == 0, "Must give at least as many string arguments as are required by the ErrNum.");
   }