Bug 1388789 - make va_list nsTextFormatter private; r=froydnj

The runtime type-checking rewrite of nsTextFormatter will not support
va_list uses.  So, make these functions private and fix the sole user.

MozReview-Commit-ID: IBWALVzIcHC

--HG--
extra : rebase_source : a822697c81c1a054359fc2ecd894d51f95686548
This commit is contained in:
Tom Tromey 2017-08-31 15:21:37 -06:00
parent 0138e05eb2
commit fc652f4718
2 changed files with 5 additions and 5 deletions

View File

@ -483,14 +483,12 @@ nsCommandLine::Init(int32_t argc, const char* const* argv, nsIFile* aWorkingDir,
return NS_OK;
}
template<typename ...T>
static void
LogConsoleMessage(const char16_t* fmt, ...)
LogConsoleMessage(const char16_t* fmt, T... args)
{
va_list args;
va_start(args, fmt);
nsString msg;
nsTextFormatter::vssprintf(msg, fmt, args);
va_end(args);
nsTextFormatter::ssprintf(msg, fmt, args...);
nsCOMPtr<nsIConsoleService> cs = do_GetService("@mozilla.org/consoleservice;1");
if (cs)

View File

@ -58,6 +58,8 @@ public:
*/
static uint32_t ssprintf(nsAString& aOut, const char16_t* aFmt, ...);
private:
/*
* va_list forms of the above.
*/