mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Backed out changeset 42ee56af794c (bug 1237831) for bustage on a CLOSED TREE
This commit is contained in:
parent
09f5bc4670
commit
764e9f07c4
@ -11,6 +11,7 @@
|
||||
#include <algorithm>
|
||||
#include <math.h>
|
||||
|
||||
#include "prprf.h"
|
||||
#include "DecoderTraits.h"
|
||||
#include "harfbuzz/hb.h"
|
||||
#include "imgICache.h"
|
||||
@ -3524,7 +3525,7 @@ nsContentUtils::ReportToConsoleNonLocalized(const nsAString& aErrorText,
|
||||
}
|
||||
|
||||
void
|
||||
nsContentUtils::LogMessageToConsole(const char* aMsg)
|
||||
nsContentUtils::LogMessageToConsole(const char* aMsg, ...)
|
||||
{
|
||||
if (!sConsoleService) { // only need to bother null-checking here
|
||||
CallGetService(NS_CONSOLESERVICE_CONTRACTID, &sConsoleService);
|
||||
@ -3532,7 +3533,17 @@ nsContentUtils::LogMessageToConsole(const char* aMsg)
|
||||
return;
|
||||
}
|
||||
}
|
||||
sConsoleService->LogStringMessage(NS_ConvertUTF8toUTF16(aMsg).get());
|
||||
|
||||
va_list args;
|
||||
va_start(args, aMsg);
|
||||
char* formatted = PR_vsmprintf(aMsg, args);
|
||||
va_end(args);
|
||||
if (!formatted) {
|
||||
return;
|
||||
}
|
||||
|
||||
sConsoleService->LogStringMessage(NS_ConvertUTF8toUTF16(formatted).get());
|
||||
PR_smprintf_free(formatted);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -893,8 +893,8 @@ public:
|
||||
uint32_t aLineNumber = 0,
|
||||
uint32_t aColumnNumber = 0);
|
||||
|
||||
static void LogMessageToConsole(const char* aMsg);
|
||||
|
||||
static void LogMessageToConsole(const char* aMsg, ...);
|
||||
|
||||
/**
|
||||
* Get the localized string named |aKey| in properties file |aFile|.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user