Backed out changeset 2129aca7cab2 (bug 553032)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 19 Oct 2016 18:29:31 +0200
changeset 318613 32cd13c5b22147df3d3fd63a445b49806f5f076d
parent 318612 e16c9ee30897db1824fde9566dbb117499824364
child 318614 515d4661df696d8cf7d122fc2820a7629983cc13
push id20725
push userphilringnalda@gmail.com
push dateThu, 20 Oct 2016 01:36:01 +0000
treeherderfx-team@998ad5a74da8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs553032
milestone52.0a1
backs out2129aca7cab2e779963fb4ca216823e5ce212ada
Backed out changeset 2129aca7cab2 (bug 553032)
js/src/jsfriendapi.cpp
--- a/js/src/jsfriendapi.cpp
+++ b/js/src/jsfriendapi.cpp
@@ -758,26 +758,21 @@ FormatValue(JSContext* cx, const Value& 
     const char* found = strstr(buf, "function ");
     if (found && (found - buf <= 2))
         return "[function]";
     return buf;
 }
 
 // Wrapper for JS_sprintf_append() that reports allocation failure to the
 // context.
+template <typename... Args>
 static char*
-MOZ_FORMAT_PRINTF(3, 4)
-sprintf_append(JSContext* cx, char* buf, const char* fmt, ...)
+sprintf_append(JSContext* cx, char* buf, Args&&... args)
 {
-    va_list ap;
-
-    va_start(ap, fmt);
-    char* result = JS_vsprintf_append(buf, fmt, ap);
-    va_end(ap);
-
+    char* result = JS_sprintf_append(buf, mozilla::Forward<Args>(args)...);
     if (!result) {
         ReportOutOfMemory(cx);
         return nullptr;
     }
 
     return result;
 }